problem
stringlengths 26
131k
| labels
class label 2
classes |
|---|---|
Calculate the date a period of time in the past from today : <p>I use this code to get the current date</p>
<pre><code>let date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy.MM.dd"
let result = formatter.string(from: date)
</code></pre>
<p>Any idea on how can I get the date in the past, for example a day or a year before the current date?</p>
| 0debug
|
Flutter - DropdownButton using keyValuePair : <p>I am new to flutter. I am trying to create a dropdownbutton that takes a list of keyValuePairs. When a user selects an item from the list I want to get the key of the selected item. I have search through the example but didn't see any way to do this. Is there another component I should use or is there a plugin to do just that. Thanks for your help on this. </p>
| 0debug
|
Can you export/migrate users out of AWS cognito, does it cause vendor lock-in? : <p>This is a question about vendor lock in and AWS cognito. Can user data and encrypted/hashed passwords be exported out of cognito if we ever move off of AWS?</p>
<p>Can/does cognito use standard hashing or configurable hashing of the user passwords or allow export of things like tokens?</p>
| 0debug
|
How avoid to register multiple network broadcast receivers in Android : I have a problem with registration network broadcast receiver. As no one was using android 7.0 in this app it was all right because I declared this broadcast in manifest. Right now, I must register broadcast receiver in my config activity after clicking save button. But when somebody clicked few times this button, then he register a lot of network services. The problem is that the service must work in the background and intercept situations when the internet appears when the application is not open.
networkService = new NetworkService();
if (!isReceiverRegistered(networkService)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
getActivity().registerReceiver(networkService, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
receivers.add(networkService);
}
}
Right now, I already have this broadcast receiver in Manifest and I already activate him after click in save button.
<receiver android:name=".services.NetworkService"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="999">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.REBOOT"/>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
| 0debug
|
Want to find all the timestamp values interval by each minute between the two timestamp records : I have a table having three fields Id (Integer) - Unique , Open Date (Datetime), Close Date(DateTime)-
Id Open Date Close Date
1 2019-07-03 16:28:39.497 2019-07-04 16:28:39.497
2 2019-07-04 15:28:39.497 2019-07-05 19:28:39.497
…..N
I want to calculate the all the timestamps between open date and close date with an interval of each minute .
So the final output i want is like this -
Id Open Date Close Date TimeStamp Range
1 2019-07-03 16:28:39.497 2019-07-04 16:28:39.497 2019-07-03 16:29:00.0000
1 2019-07-03 16:28:39.497 2019-07-04 16:28:39.497 2019-07-03 16:30:00.0000
1 2019-07-03 16:28:39.497 2019-07-04 16:28:39.497 2019-07-03 16:31:00.0000
1 2019-07-03 16:28:39.497 2019-07-04 16:28:39.497 …..........................
1 2019-07-03 16:28:39.497 2019-07-04 16:28:39.497 2019-07-04 16:27:00.0000
2 2019-07-04 15:28:39.497 2019-07-05 19:28:39.497 2019-07-04 15:29:00.0000
2 2019-07-04 15:28:39.497 2019-07-05 19:28:39.497 2019-07-04 15:30:00.0000
2 2019-07-04 15:28:39.497 2019-07-05 19:28:39.497 2019-07-04 15:31:00.0000
2 2019-07-04 15:28:39.497 2019-07-05 19:28:39.497 ….................................
2 2019-07-04 15:28:39.497 2019-07-05 19:28:39.497 2019-07-05 19:27:00.0000
N …............................ …........................... …......................................
Can Anyone please help to prepare the sql query for this ?
Its Quite Urgent.
Thanks in Advance :)
Please Help.
| 0debug
|
Conversion function in SQL SERVER : I need to execute a function that converts 2 characters to an integer.
The rule works this way:
99 = 99<br>
9A = 100<br>
9B = 101<br>
9C = 102<br>
9D = 103<br>
.<br>
.<br>
.<br>
9Z = 125<br>
AA = 126<br>
AB = 127<br>
So for example, my function receives '9C' and should return '102'. The function must be done in SQL.
| 0debug
|
What are width and height parameters for in java.awt.Component.getBaseline(int, int)? : <p>Java API documentation doesn't have a lot of information about this. Could someone shed some light on this question?</p>
| 0debug
|
Change image src with jquery for 5 seconds : <p>I need help with how to change an image src with another one for 5 seconds before reverting back to the default one with jquery.</p>
<p>below is a code I am trying to use.</p>
<pre><code>$('#indicator').attr("src", 'notification.png');
</code></pre>
<p>I need to change it for 5 seconds only.</p>
| 0debug
|
static void vtd_do_iommu_translate(VTDAddressSpace *vtd_as, uint8_t bus_num,
uint8_t devfn, hwaddr addr, bool is_write,
IOMMUTLBEntry *entry)
{
IntelIOMMUState *s = vtd_as->iommu_state;
VTDContextEntry ce;
VTDContextCacheEntry *cc_entry = &vtd_as->context_cache_entry;
uint64_t slpte;
uint32_t level;
uint16_t source_id = vtd_make_source_id(bus_num, devfn);
int ret_fr;
bool is_fpd_set = false;
bool reads = true;
bool writes = true;
VTDIOTLBEntry *iotlb_entry;
if (vtd_is_interrupt_addr(addr)) {
if (is_write) {
VTD_DPRINTF(MMU, "write request to interrupt address "
"gpa 0x%"PRIx64, addr);
entry->iova = addr & VTD_PAGE_MASK_4K;
entry->translated_addr = addr & VTD_PAGE_MASK_4K;
entry->addr_mask = ~VTD_PAGE_MASK_4K;
entry->perm = IOMMU_WO;
return;
} else {
VTD_DPRINTF(GENERAL, "error: read request from interrupt address "
"gpa 0x%"PRIx64, addr);
vtd_report_dmar_fault(s, source_id, addr, VTD_FR_READ, is_write);
return;
}
}
iotlb_entry = vtd_lookup_iotlb(s, source_id, addr);
if (iotlb_entry) {
VTD_DPRINTF(CACHE, "hit iotlb sid 0x%"PRIx16 " gpa 0x%"PRIx64
" slpte 0x%"PRIx64 " did 0x%"PRIx16, source_id, addr,
iotlb_entry->slpte, iotlb_entry->domain_id);
slpte = iotlb_entry->slpte;
reads = iotlb_entry->read_flags;
writes = iotlb_entry->write_flags;
goto out;
}
if (cc_entry->context_cache_gen == s->context_cache_gen) {
VTD_DPRINTF(CACHE, "hit context-cache bus %d devfn %d "
"(hi %"PRIx64 " lo %"PRIx64 " gen %"PRIu32 ")",
bus_num, devfn, cc_entry->context_entry.hi,
cc_entry->context_entry.lo, cc_entry->context_cache_gen);
ce = cc_entry->context_entry;
is_fpd_set = ce.lo & VTD_CONTEXT_ENTRY_FPD;
} else {
ret_fr = vtd_dev_to_context_entry(s, bus_num, devfn, &ce);
is_fpd_set = ce.lo & VTD_CONTEXT_ENTRY_FPD;
if (ret_fr) {
ret_fr = -ret_fr;
if (is_fpd_set && vtd_is_qualified_fault(ret_fr)) {
VTD_DPRINTF(FLOG, "fault processing is disabled for DMA "
"requests through this context-entry "
"(with FPD Set)");
} else {
vtd_report_dmar_fault(s, source_id, addr, ret_fr, is_write);
}
return;
}
VTD_DPRINTF(CACHE, "update context-cache bus %d devfn %d "
"(hi %"PRIx64 " lo %"PRIx64 " gen %"PRIu32 "->%"PRIu32 ")",
bus_num, devfn, ce.hi, ce.lo,
cc_entry->context_cache_gen, s->context_cache_gen);
cc_entry->context_entry = ce;
cc_entry->context_cache_gen = s->context_cache_gen;
}
ret_fr = vtd_gpa_to_slpte(&ce, addr, is_write, &slpte, &level,
&reads, &writes);
if (ret_fr) {
ret_fr = -ret_fr;
if (is_fpd_set && vtd_is_qualified_fault(ret_fr)) {
VTD_DPRINTF(FLOG, "fault processing is disabled for DMA requests "
"through this context-entry (with FPD Set)");
} else {
vtd_report_dmar_fault(s, source_id, addr, ret_fr, is_write);
}
return;
}
vtd_update_iotlb(s, source_id, VTD_CONTEXT_ENTRY_DID(ce.hi), addr, slpte,
reads, writes);
out:
entry->iova = addr & VTD_PAGE_MASK_4K;
entry->translated_addr = vtd_get_slpte_addr(slpte) & VTD_PAGE_MASK_4K;
entry->addr_mask = ~VTD_PAGE_MASK_4K;
entry->perm = (writes ? 2 : 0) + (reads ? 1 : 0);
}
| 1threat
|
all of nodes in linkedlist are the same, seems insertion is not working : whatsup guys
i have a linked list in cpp , after inserting several nodes now i see all of them are the same , thou im using different values to add to node each time ,but its like all of them are same , even when trying to change a node all of them are changing together or its the same node that is always being returnd idk.
class node
{
public:
int ochance=3;
string question;
string option1;
int peopleeffectop1;
int courteffectop1;
int treasuryeffectop1;
string option2;
int peopleeffectop2;
int courteffectop2;
int treasuryeffectop2;
node *next;
};
class list
{
private:
node *head, *tail;
public:
list()
{
head=NULL;
tail=NULL;
}
void createnode(int value , string q , string ans1 , int ans1ef1 , int ans1ef2, int ans1ef3 , string ans2, int ans2ef1 , int ans2ef2, int ans2ef3 )
{
node *temp=new node;
temp->ochance=value;
temp->question = q;
temp->option1 = ans1;
temp->peopleeffectop1 = ans1ef1;
temp->courteffectop1 = ans1ef2;
temp->treasuryeffectop1 = ans1ef3;
temp->option2 = ans2;
temp->peopleeffectop2 = ans2ef1;
temp->courteffectop2 = ans2ef2;
temp->treasuryeffectop2 = ans2ef3;
temp->next=NULL;
if(head==NULL)
{
head=temp;
tail=temp;
temp=NULL;
}
else
{
tail->next=temp;
tail=temp;
}
}
node getnth(int pos)
{
node* tmp = new node;
tmp= head;
int i =0 ;
while(tmp!=NULL){
if (i=pos) {
return *tmp;
}
i++;
tmp = tmp->next;
}
}
int getlen(){
node* tmp = new node;
tmp= head;
int i =0 ;
while(tmp!=NULL){
i++;
tmp = tmp->next;
}
return i;
}
void minus(int pos){
node* tmp = new node;
tmp= head;
int i =0 ;
while(tmp!=NULL){
if (i=pos) {
tmp->ochance -=1;
}
i++;
tmp = tmp->next;
}
}
void delete_first()
{
node *temp=new node;
temp=head;
head=head->next;
delete temp;
}
void delete_last()
{
node *current=new node;
node *previous=new node;
current=head;
while(current->next!=NULL)
{
previous=current;
current=current->next;
}
tail=previous;
previous->next=NULL;
delete current;
}
void delete_position(int pos)
{
node *current=new node;
node *previous=new node;
current=head;
for(int i=1;i<pos;i++)
{
previous=current;
current=current->next;
}
previous->next=current->next;
}
};
| 0debug
|
static void test_visitor_in_number(TestInputVisitorData *data,
const void *unused)
{
double res = 0, value = 3.14;
Visitor *v;
v = visitor_input_test_init(data, "%f", value);
visit_type_number(v, NULL, &res, &error_abort);
g_assert_cmpfloat(res, ==, value);
}
| 1threat
|
static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t *uvbuf0, uint16_t *uvbuf1,
uint8_t *dest, int dstW, int uvalpha, int dstFormat, int flags, int y)
{
const int yalpha1=0;
int i;
uint16_t *buf1= buf0;
const int yalpha= 4096;
if(flags&SWS_FULL_CHR_H_INT)
{
RENAME(yuv2packed2)(c, buf0, buf0, uvbuf0, uvbuf1, dest, dstW, 0, uvalpha, y);
return;
}
#ifdef HAVE_MMX
if( uvalpha < 2048 )
{
switch(dstFormat)
{
case PIX_FMT_RGB32:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1(%%REGBP, %5)
WRITEBGR32(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_BGR24:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1(%%REGBP, %5)
WRITEBGR24(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_BGR555:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1(%%REGBP, %5)
#ifdef DITHER1XBPP
"paddusb "MANGLE(b5Dither)", %%mm2\n\t"
"paddusb "MANGLE(g5Dither)", %%mm4\n\t"
"paddusb "MANGLE(r5Dither)", %%mm5\n\t"
#endif
WRITEBGR15(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_BGR565:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1(%%REGBP, %5)
#ifdef DITHER1XBPP
"paddusb "MANGLE(b5Dither)", %%mm2\n\t"
"paddusb "MANGLE(g6Dither)", %%mm4\n\t"
"paddusb "MANGLE(r5Dither)", %%mm5\n\t"
#endif
WRITEBGR16(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_YUYV422:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2PACKED1(%%REGBP, %5)
WRITEYUY2(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
}
}
else
{
switch(dstFormat)
{
case PIX_FMT_RGB32:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1b(%%REGBP, %5)
WRITEBGR32(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_BGR24:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1b(%%REGBP, %5)
WRITEBGR24(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_BGR555:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1b(%%REGBP, %5)
#ifdef DITHER1XBPP
"paddusb "MANGLE(b5Dither)", %%mm2\n\t"
"paddusb "MANGLE(g5Dither)", %%mm4\n\t"
"paddusb "MANGLE(r5Dither)", %%mm5\n\t"
#endif
WRITEBGR15(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_BGR565:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2RGB1b(%%REGBP, %5)
#ifdef DITHER1XBPP
"paddusb "MANGLE(b5Dither)", %%mm2\n\t"
"paddusb "MANGLE(g6Dither)", %%mm4\n\t"
"paddusb "MANGLE(r5Dither)", %%mm5\n\t"
#endif
WRITEBGR16(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
case PIX_FMT_YUYV422:
asm volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
YSCALEYUV2PACKED1b(%%REGBP, %5)
WRITEYUY2(%%REGb, 8280(%5), %%REGBP)
"pop %%"REG_BP" \n\t"
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
:: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
"a" (&c->redDither)
);
return;
}
}
#endif
if( uvalpha < 2048 )
{
YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGB1_C, YSCALE_YUV_2_PACKED1_C)
}else{
YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGB1B_C, YSCALE_YUV_2_PACKED1B_C)
}
}
| 1threat
|
Spring Webflux + JPA: Reactive Repositories are not supported by JPA : <p>I am getting error when I start my app <code>JPA: Reactive Repositories are not supported by JPA.</code>
My Pom has below dependencies and i am using <code>Spring Boot 2.0.5</code></p>
<pre><code><dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</code></pre>
<p>here is my repository interface.</p>
<pre><code>public interface CustomerRepository extends ReactiveCrudRepository {
}
</code></pre>
<p>when I start my application it throws error:</p>
<pre><code>org.springframework.dao.InvalidDataAccessApiUsageException: Reactive Repositories are not supported by JPA. Offending repository is com.example.demo.CustomerRepository!
at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.useRepositoryConfiguration(RepositoryConfigurationExtensionSupport.java:310) ~[spring-data-commons-2.0.10.RELEASE.jar:2.0.10.RELEASE]
at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:103) ~[spring-data-commons-2.0.10.RELEASE.jar:2.0.10.RELEASE]
at org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:126) ~[spring-data-commons-2.0.10.RELEASE.jar:2.0.10.RELEASE]
at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport.registerBeanDefinitions(AbstractRepositoryConfigurationSourceSupport.java:60) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:358) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:1.8.0_144]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:357) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:145) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:61) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
</code></pre>
<p>Can someone please advise if JPA is not supported then what should I use, any help is appreciated..</p>
| 0debug
|
UNLocationNotificationTrigger- Not working in simulator : <p>Using User Notification framework available in iOS 10 i tried to trigger notification whenever User enters specific geo location using UNLocationNotificationTrigger.
When I tried test it through simulator by simulating the Geo location, the notification is not getting triggered, but Location manager returns the updated geo location. Should this be tested in real device instead of running it in simulator?</p>
| 0debug
|
static int vhdx_create_new_headers(BlockDriverState *bs, uint64_t image_size,
uint32_t log_size)
{
int ret = 0;
VHDXHeader *hdr = NULL;
hdr = g_malloc0(sizeof(VHDXHeader));
hdr->signature = VHDX_HEADER_SIGNATURE;
hdr->sequence_number = g_random_int();
hdr->log_version = 0;
hdr->version = 1;
hdr->log_length = log_size;
hdr->log_offset = VHDX_HEADER_SECTION_END;
vhdx_guid_generate(&hdr->file_write_guid);
vhdx_guid_generate(&hdr->data_write_guid);
ret = vhdx_write_header(bs, hdr, VHDX_HEADER1_OFFSET, false);
if (ret < 0) {
goto exit;
}
hdr->sequence_number++;
ret = vhdx_write_header(bs, hdr, VHDX_HEADER2_OFFSET, false);
if (ret < 0) {
goto exit;
}
exit:
g_free(hdr);
return ret;
}
| 1threat
|
static void ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, int stride,
const uint8_t *table)
{
int i;
int j;
int out = 0;
int c;
int t;
while (out < width){
c = ir2_get_code(&ctx->gb);
if(c > 0x80) {
c -= 0x80;
for (i = 0; i < c * 2; i++)
dst[out++] = 0x80;
} else {
dst[out++] = table[c * 2];
dst[out++] = table[(c * 2) + 1];
}
}
dst += stride;
for (j = 1; j < height; j++){
out = 0;
while (out < width){
c = ir2_get_code(&ctx->gb);
if(c > 0x80) {
c -= 0x80;
for (i = 0; i < c * 2; i++) {
dst[out] = dst[out - stride];
out++;
}
} else {
t = dst[out - stride] + (table[c * 2] - 128);
CLAMP_TO_BYTE(t);
dst[out] = t;
out++;
t = dst[out - stride] + (table[(c * 2) + 1] - 128);
CLAMP_TO_BYTE(t);
dst[out] = t;
out++;
}
}
dst += stride;
}
}
| 1threat
|
what is the node.js equivalent of this tsql query : The legacy system used to store passwords in query's output format,
I have to take that encrypted password and create a node function to get the same result as the below query
where the password is test and mysalt is the salt used.
select HASHBYTES('SHA1', convert(VARCHAR, HASHBYTES('SHA1', CONVERT(NVARCHAR(4000), ’test'))) + 'mysalt')
| 0debug
|
static int32_t bmdma_prepare_buf(IDEDMA *dma, int32_t limit)
{
BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma);
IDEState *s = bmdma_active_if(bm);
PCIDevice *pci_dev = PCI_DEVICE(bm->pci_dev);
struct {
uint32_t addr;
uint32_t size;
} prd;
int l, len;
pci_dma_sglist_init(&s->sg, pci_dev,
s->nsector / (BMDMA_PAGE_SIZE / 512) + 1);
s->io_buffer_size = 0;
for(;;) {
if (bm->cur_prd_len == 0) {
if (bm->cur_prd_last ||
(bm->cur_addr - bm->addr) >= BMDMA_PAGE_SIZE) {
return s->sg.size;
}
pci_dma_read(pci_dev, bm->cur_addr, &prd, 8);
bm->cur_addr += 8;
prd.addr = le32_to_cpu(prd.addr);
prd.size = le32_to_cpu(prd.size);
len = prd.size & 0xfffe;
if (len == 0)
len = 0x10000;
bm->cur_prd_len = len;
bm->cur_prd_addr = prd.addr;
bm->cur_prd_last = (prd.size & 0x80000000);
}
l = bm->cur_prd_len;
if (l > 0) {
uint64_t sg_len;
sg_len = MIN(limit - s->sg.size, bm->cur_prd_len);
if (sg_len) {
qemu_sglist_add(&s->sg, bm->cur_prd_addr, sg_len);
}
if (s->sg.size > INT32_MAX) {
error_report("IDE: sglist describes more than 2GiB.");
break;
}
bm->cur_prd_addr += l;
bm->cur_prd_len -= l;
s->io_buffer_size += l;
}
}
qemu_sglist_destroy(&s->sg);
s->io_buffer_size = 0;
return -1;
}
| 1threat
|
C# - Printing the reasult of Double LinkedList : Helo, i have a Double LinkedList that i want to print using concoleWriteLine to see the reault of the linkedList. the problam i have is that i know how to print a list with just a Next node in terms of the stopping condition (which is when node.next is null), but this is a double linked list with both Next and Previous. where every node in the list connect's to other node so there are no node.next == null.
what is the stopping condition in this type of list? right now i have an infinite loop that printing the list over and over.
| 0debug
|
phone regex space : <p>I have this phone regex, but I want it to accept spaces.</p>
<p>For example <code>+57 52 5252255</code> should pass, but currently it's not passing.
also "+91 9 820 09 8200" should pass
so a space anywhere is acceptable</p>
<pre><code>var phone_regex =/^\s*(?:\+?(\d{1,3}))?[- (]*(\d{3})[- )]*(\d{3})[- ]*(\d{4})(?: *[x/#]{1}(\d+))?\s*$/;
</code></pre>
<p><a href="https://jsfiddle.net/ofn9knay/268/" rel="nofollow noreferrer">https://jsfiddle.net/ofn9knay/268/</a></p>
| 0debug
|
PACT vs spring cloud contract tests : <p>I am trying to understand the better tool between PACT and Spring Cloud Contract to implement Consumer Driver Contract Tests.
I dont find any clear examples to find the pros and cons.</p>
<p>I want to implement CDCT, and I dont use Spring in my project. From what i understood I am assuming PACT is good to go with. </p>
<p>Any information or suggestions are welcomed.
Thank you.</p>
| 0debug
|
static void m68k_cpu_class_init(ObjectClass *c, void *data)
{
M68kCPUClass *mcc = M68K_CPU_CLASS(c);
CPUClass *cc = CPU_CLASS(c);
DeviceClass *dc = DEVICE_CLASS(c);
mcc->parent_realize = dc->realize;
dc->realize = m68k_cpu_realizefn;
mcc->parent_reset = cc->reset;
cc->reset = m68k_cpu_reset;
cc->class_by_name = m68k_cpu_class_by_name;
cc->has_work = m68k_cpu_has_work;
cc->do_interrupt = m68k_cpu_do_interrupt;
cc->cpu_exec_interrupt = m68k_cpu_exec_interrupt;
cc->dump_state = m68k_cpu_dump_state;
cc->set_pc = m68k_cpu_set_pc;
cc->gdb_read_register = m68k_cpu_gdb_read_register;
cc->gdb_write_register = m68k_cpu_gdb_write_register;
#ifdef CONFIG_USER_ONLY
cc->handle_mmu_fault = m68k_cpu_handle_mmu_fault;
#else
cc->get_phys_page_debug = m68k_cpu_get_phys_page_debug;
#endif
cc->cpu_exec_enter = m68k_cpu_exec_enter;
cc->cpu_exec_exit = m68k_cpu_exec_exit;
dc->vmsd = &vmstate_m68k_cpu;
cc->gdb_num_core_regs = 18;
cc->gdb_core_xml_file = "cf-core.xml";
}
| 1threat
|
get codebar from image in python : I need to get the information in this barcode with the python pyzbar library, but it does not recognize it, should I make any improvement before using pyzbar?
[BarCode][1]
[1]: https://i.stack.imgur.com/D8Jk7.jpg
| 0debug
|
Mysql command line password with special characters is not working : <p>I've the following bash script to upgrade my database schema. Script reads hostname and database password from command line.</p>
<p>The problem is here that if the password is <strong>alphanumeric</strong> e.g <strong>r00t</strong> then script works. But if password contains special characters e.g <strong>pa**w0rd</strong>, then script does not work and directly exits. Please help me with this. Thanks.</p>
<pre><code>#!/bin/bash
echo "Enter hostname."
read -p "Hostname [localhost]: " DB_HOST
DB_HOST=${DB_HOST:-localhost}
echo "Enter MySQL root password"
DB_PASS=
while [[ $DB_PASS = "" ]]; do
read -sp "Password: " DB_PASS
done
MYSQL="mysql --force --connect-timeout=90 --host=$DB_HOST -u root --password=${DB_PASS}"
# Apply schema updates. My DBName is "mydb"
# Upgrade schema file is stored in "mysql" folder
$MYSQL mydb -e exit > /dev/null 2>&1 && $MYSQL mydb < "../mysql/upgrade_schema_v.2.1.sql"
</code></pre>
| 0debug
|
Open link in new window with Vuetify v-btn and Vue router : <p>Recent versions of Vue Router allow for links that open in a new tab, e.g. the following</p>
<pre><code><router-link :to="{ name: 'fooRoute'}" target="_blank">
Link Text
</router-link>
</code></pre>
<p>correctly renders an <code><a target="_blank"></code>.</p>
<p>However, the same doesn't seem to work with a Vuetify <code>v-btn</code>, which supports router paths, for example if we want to use an icon.</p>
<pre><code><v-btn icon :to="{ name: 'fooRoute'}" target="_blank">
<v-icon>window</v-icon> Link Text
</v-btn>
</code></pre>
<p>Despite the component rendering an <code><a></code>, there is no <code>target="_blank"</code> attribute. How can we make this work?</p>
| 0debug
|
Can I save code within <script>...</script> in a different file and include it? : <p>Really basic javascript question:</p>
<p>Can I save code within <code><script>...</script></code> in a different file and include it?</p>
<p>Will it work exactly the same?</p>
<p>Can I include it in the exact same place as the <code><script>...</script></code>?</p>
| 0debug
|
VirtIODevice *virtio_balloon_init(DeviceState *dev)
{
VirtIOBalloon *s;
s = (VirtIOBalloon *)virtio_common_init("virtio-balloon",
VIRTIO_ID_BALLOON,
8, sizeof(VirtIOBalloon));
s->vdev.get_config = virtio_balloon_get_config;
s->vdev.set_config = virtio_balloon_set_config;
s->vdev.get_features = virtio_balloon_get_features;
s->ivq = virtio_add_queue(&s->vdev, 128, virtio_balloon_handle_output);
s->dvq = virtio_add_queue(&s->vdev, 128, virtio_balloon_handle_output);
s->svq = virtio_add_queue(&s->vdev, 128, virtio_balloon_receive_stats);
reset_stats(s);
qemu_add_balloon_handler(virtio_balloon_to_target, s);
register_savevm(dev, "virtio-balloon", -1, 1,
virtio_balloon_save, virtio_balloon_load, s);
return &s->vdev;
}
| 1threat
|
static inline void halfpel_motion_search4(MpegEncContext * s,
int *mx_ptr, int *my_ptr, int dmin,
int xmin, int ymin, int xmax, int ymax,
int pred_x, int pred_y, int block_x, int block_y,
uint8_t *ref_picture)
{
UINT16 *mv_penalty= s->mv_penalty[s->f_code] + MAX_MV;
const int quant= s->qscale;
int pen_x, pen_y;
int mx, my, mx1, my1, d, xx, yy, dminh;
UINT8 *pix, *ptr;
xx = 8 * block_x;
yy = 8 * block_y;
pix = s->new_picture[0] + (yy * s->linesize) + xx;
mx = *mx_ptr;
my = *my_ptr;
ptr = ref_picture + ((yy+my) * s->linesize) + xx + mx;
dminh = dmin;
if (mx > xmin && mx < xmax &&
my > ymin && my < ymax) {
mx= mx1= 2*mx;
my= my1= 2*my;
if(dmin < Z_THRESHOLD && mx==0 && my==0){
*mx_ptr = 0;
*my_ptr = 0;
return;
}
pen_x= pred_x + mx;
pen_y= pred_y + my;
ptr-= s->linesize;
CHECK_HALF_MV4(xy2, -1, -1)
CHECK_HALF_MV4(y2 , 0, -1)
CHECK_HALF_MV4(xy2, +1, -1)
ptr+= s->linesize;
CHECK_HALF_MV4(x2 , -1, 0)
CHECK_HALF_MV4(x2 , +1, 0)
CHECK_HALF_MV4(xy2, -1, +1)
CHECK_HALF_MV4(y2 , 0, +1)
CHECK_HALF_MV4(xy2, +1, +1)
}else{
mx*=2;
my*=2;
}
*mx_ptr = mx;
*my_ptr = my;
}
| 1threat
|
MigrationIncomingState *migration_incoming_state_new(QEMUFile* f)
{
mis_current = g_malloc0(sizeof(MigrationIncomingState));
mis_current->file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
return mis_current;
}
| 1threat
|
C: Functions with custom type in header : I've written a program that uses three functions to which I pass a custom type defined as:
typedef struct w
{
char *wd;
long position;
struct w *next;
}W;
typedef W *word;
When I try to put the functions in a header file like this:
void find(char *s,word *T);
void seek(char *s,word p);
void look(word p);
and try to compile di file I get
> error: unknown type name ‘word’
How do I fix it?
| 0debug
|
void avfilter_register_all(void)
{
static int initialized;
if (initialized)
return;
initialized = 1;
REGISTER_FILTER (ACONVERT, aconvert, af);
REGISTER_FILTER (AFIFO, afifo, af);
REGISTER_FILTER (AFORMAT, aformat, af);
REGISTER_FILTER (AMERGE, amerge, af);
REGISTER_FILTER (AMIX, amix, af);
REGISTER_FILTER (ANULL, anull, af);
REGISTER_FILTER (ARESAMPLE, aresample, af);
REGISTER_FILTER (ASETNSAMPLES, asetnsamples, af);
REGISTER_FILTER (ASETPTS, asetpts, af);
REGISTER_FILTER (ASETTB, asettb, af);
REGISTER_FILTER (ASHOWINFO, ashowinfo, af);
REGISTER_FILTER (ASPLIT, asplit, af);
REGISTER_FILTER (ASTREAMSYNC, astreamsync, af);
REGISTER_FILTER (ASYNCTS, asyncts, af);
REGISTER_FILTER (ATEMPO, atempo, af);
REGISTER_FILTER (CHANNELMAP, channelmap, af);
REGISTER_FILTER (CHANNELSPLIT,channelsplit,af);
REGISTER_FILTER (EARWAX, earwax, af);
REGISTER_FILTER (JOIN, join, af);
REGISTER_FILTER (PAN, pan, af);
REGISTER_FILTER (SILENCEDETECT, silencedetect, af);
REGISTER_FILTER (VOLUME, volume, af);
REGISTER_FILTER (VOLUMEDETECT,volumedetect,af);
REGISTER_FILTER (RESAMPLE, resample, af);
REGISTER_FILTER (AEVALSRC, aevalsrc, asrc);
REGISTER_FILTER (ANULLSRC, anullsrc, asrc);
REGISTER_FILTER (FLITE, flite, asrc);
REGISTER_FILTER (ABUFFERSINK, abuffersink, asink);
REGISTER_FILTER (ANULLSINK, anullsink, asink);
REGISTER_FILTER (ALPHAEXTRACT, alphaextract, vf);
REGISTER_FILTER (ALPHAMERGE, alphamerge, vf);
REGISTER_FILTER (ASS, ass, vf);
REGISTER_FILTER (BBOX, bbox, vf);
REGISTER_FILTER (BLACKDETECT, blackdetect, vf);
REGISTER_FILTER (BLACKFRAME, blackframe, vf);
REGISTER_FILTER (BOXBLUR, boxblur, vf);
REGISTER_FILTER (COLORMATRIX, colormatrix, vf);
REGISTER_FILTER (COPY, copy, vf);
REGISTER_FILTER (CROP, crop, vf);
REGISTER_FILTER (CROPDETECT, cropdetect, vf);
REGISTER_FILTER (DECIMATE, decimate, vf);
REGISTER_FILTER (DELOGO, delogo, vf);
REGISTER_FILTER (DESHAKE, deshake, vf);
REGISTER_FILTER (DRAWBOX, drawbox, vf);
REGISTER_FILTER (DRAWTEXT, drawtext, vf);
REGISTER_FILTER (EDGEDETECT, edgedetect, vf);
REGISTER_FILTER (FADE, fade, vf);
REGISTER_FILTER (FIELDORDER, fieldorder, vf);
REGISTER_FILTER (FIFO, fifo, vf);
REGISTER_FILTER (FORMAT, format, vf);
REGISTER_FILTER (FPS, fps, vf);
REGISTER_FILTER (FRAMESTEP, framestep, vf);
REGISTER_FILTER (FREI0R, frei0r, vf);
REGISTER_FILTER (GRADFUN, gradfun, vf);
REGISTER_FILTER (HFLIP, hflip, vf);
REGISTER_FILTER (HQDN3D, hqdn3d, vf);
REGISTER_FILTER (HUE, hue, vf);
REGISTER_FILTER (IDET, idet, vf);
REGISTER_FILTER (LUT, lut, vf);
REGISTER_FILTER (LUTRGB, lutrgb, vf);
REGISTER_FILTER (LUTYUV, lutyuv, vf);
REGISTER_FILTER (MP, mp, vf);
REGISTER_FILTER (NEGATE, negate, vf);
REGISTER_FILTER (NOFORMAT, noformat, vf);
REGISTER_FILTER (NULL, null, vf);
REGISTER_FILTER (OCV, ocv, vf);
REGISTER_FILTER (OVERLAY, overlay, vf);
REGISTER_FILTER (PAD, pad, vf);
REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);
REGISTER_FILTER (REMOVELOGO, removelogo, vf);
REGISTER_FILTER (SCALE, scale, vf);
REGISTER_FILTER (SELECT, select, vf);
REGISTER_FILTER (SETDAR, setdar, vf);
REGISTER_FILTER (SETFIELD, setfield, vf);
REGISTER_FILTER (SETPTS, setpts, vf);
REGISTER_FILTER (SETSAR, setsar, vf);
REGISTER_FILTER (SETTB, settb, vf);
REGISTER_FILTER (SHOWINFO, showinfo, vf);
REGISTER_FILTER (SLICIFY, slicify, vf);
REGISTER_FILTER (SMARTBLUR, smartblur, vf);
REGISTER_FILTER (SPLIT, split, vf);
REGISTER_FILTER (SUPER2XSAI, super2xsai, vf);
REGISTER_FILTER (SWAPUV, swapuv, vf);
REGISTER_FILTER (THUMBNAIL, thumbnail, vf);
REGISTER_FILTER (TILE, tile, vf);
REGISTER_FILTER (TINTERLACE, tinterlace, vf);
REGISTER_FILTER (TRANSPOSE, transpose, vf);
REGISTER_FILTER (UNSHARP, unsharp, vf);
REGISTER_FILTER (VFLIP, vflip, vf);
REGISTER_FILTER (YADIF, yadif, vf);
REGISTER_FILTER (CELLAUTO, cellauto, vsrc);
REGISTER_FILTER (COLOR, color, vsrc);
REGISTER_FILTER (FREI0R, frei0r_src, vsrc);
REGISTER_FILTER (LIFE, life, vsrc);
REGISTER_FILTER (MANDELBROT, mandelbrot, vsrc);
REGISTER_FILTER (MPTESTSRC, mptestsrc, vsrc);
REGISTER_FILTER (NULLSRC, nullsrc, vsrc);
REGISTER_FILTER (RGBTESTSRC, rgbtestsrc, vsrc);
REGISTER_FILTER (SMPTEBARS, smptebars, vsrc);
REGISTER_FILTER (TESTSRC, testsrc, vsrc);
REGISTER_FILTER (BUFFERSINK, buffersink, vsink);
REGISTER_FILTER (FFBUFFERSINK,ffbuffersink,vsink);
REGISTER_FILTER (NULLSINK, nullsink, vsink);
REGISTER_FILTER (CONCAT, concat, avf);
REGISTER_FILTER (SHOWSPECTRUM,showspectrum,avf);
REGISTER_FILTER (SHOWWAVES, showwaves, avf);
REGISTER_FILTER (AMOVIE, amovie, avsrc);
REGISTER_FILTER (MOVIE, movie, avsrc);
{
extern AVFilter avfilter_vsrc_buffer;
avfilter_register(&avfilter_vsrc_buffer);
}
{
extern AVFilter avfilter_asrc_abuffer;
avfilter_register(&avfilter_asrc_abuffer);
}
{
extern AVFilter avfilter_vsink_buffer;
avfilter_register(&avfilter_vsink_buffer);
}
{
extern AVFilter avfilter_asink_abuffer;
avfilter_register(&avfilter_asink_abuffer);
}
}
| 1threat
|
History stuck cleared when clicking on recent apps button : I'm working on a launcher app that basically launches other installed apps on the device with an explicit intent and I have a edge case scenario:
An Activity (Act) creates an intent of an application (App) and starts it by calling startActivity(intent).
App get launched, my Activity going to "stop" state.
After a while I want to get back to my application so I click on "back" hard button that closes App and bring my Application to foreground (resume state).
This is the wanted behaviour.
Here is the edge case:
If I click on the "recent applications" hard button (square icon) while on App is launched, history stuck is lost, and when I return to App, and click on "back" hard button - App exists to the Launcher screen and onResume of my application is being called.
I searched the web for a solution for couple of hours now, maybe I'll find a solution here.
Thanks
| 0debug
|
static void load_linux(void *fw_cfg,
const char *kernel_filename,
const char *initrd_filename,
const char *kernel_cmdline,
target_phys_addr_t max_ram_size)
{
uint16_t protocol;
int setup_size, kernel_size, initrd_size = 0, cmdline_size;
uint32_t initrd_max;
uint8_t header[8192], *setup, *kernel, *initrd_data;
target_phys_addr_t real_addr, prot_addr, cmdline_addr, initrd_addr = 0;
FILE *f;
char *vmode;
cmdline_size = (strlen(kernel_cmdline)+16) & ~15;
f = fopen(kernel_filename, "rb");
if (!f || !(kernel_size = get_file_size(f)) ||
fread(header, 1, MIN(ARRAY_SIZE(header), kernel_size), f) !=
MIN(ARRAY_SIZE(header), kernel_size)) {
fprintf(stderr, "qemu: could not load kernel '%s': %s\n",
kernel_filename, strerror(errno));
#if 0
fprintf(stderr, "header magic: %#x\n", ldl_p(header+0x202));
#endif
if (ldl_p(header+0x202) == 0x53726448)
protocol = lduw_p(header+0x206);
else {
if (load_multiboot(fw_cfg, f, kernel_filename, initrd_filename,
kernel_cmdline, kernel_size, header))
return;
protocol = 0;
if (protocol < 0x200 || !(header[0x211] & 0x01)) {
real_addr = 0x90000;
cmdline_addr = 0x9a000 - cmdline_size;
prot_addr = 0x10000;
} else if (protocol < 0x202) {
real_addr = 0x90000;
cmdline_addr = 0x9a000 - cmdline_size;
prot_addr = 0x100000;
} else {
real_addr = 0x10000;
cmdline_addr = 0x20000;
prot_addr = 0x100000;
#if 0
fprintf(stderr,
"qemu: real_addr = 0x" TARGET_FMT_plx "\n"
"qemu: cmdline_addr = 0x" TARGET_FMT_plx "\n"
"qemu: prot_addr = 0x" TARGET_FMT_plx "\n",
real_addr,
cmdline_addr,
prot_addr);
#endif
if (protocol >= 0x203)
initrd_max = ldl_p(header+0x22c);
else
initrd_max = 0x37ffffff;
if (initrd_max >= max_ram_size-ACPI_DATA_SIZE)
initrd_max = max_ram_size-ACPI_DATA_SIZE-1;
fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_ADDR, cmdline_addr);
fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_SIZE, strlen(kernel_cmdline)+1);
fw_cfg_add_bytes(fw_cfg, FW_CFG_CMDLINE_DATA,
(uint8_t*)strdup(kernel_cmdline),
strlen(kernel_cmdline)+1);
if (protocol >= 0x202) {
stl_p(header+0x228, cmdline_addr);
} else {
stw_p(header+0x20, 0xA33F);
stw_p(header+0x22, cmdline_addr-real_addr);
vmode = strstr(kernel_cmdline, "vga=");
if (vmode) {
unsigned int video_mode;
vmode += 4;
if (!strncmp(vmode, "normal", 6)) {
video_mode = 0xffff;
} else if (!strncmp(vmode, "ext", 3)) {
video_mode = 0xfffe;
} else if (!strncmp(vmode, "ask", 3)) {
video_mode = 0xfffd;
} else {
video_mode = strtol(vmode, NULL, 0);
stw_p(header+0x1fa, video_mode);
if (protocol >= 0x200)
header[0x210] = 0xB0;
if (protocol >= 0x201) {
header[0x211] |= 0x80;
stw_p(header+0x224, cmdline_addr-real_addr-0x200);
if (initrd_filename) {
if (protocol < 0x200) {
fprintf(stderr, "qemu: linux kernel too old to load a ram disk\n");
initrd_size = get_image_size(initrd_filename);
initrd_addr = (initrd_max-initrd_size) & ~4095;
initrd_data = qemu_malloc(initrd_size);
load_image(initrd_filename, initrd_data);
fw_cfg_add_i32(fw_cfg, FW_CFG_INITRD_ADDR, initrd_addr);
fw_cfg_add_i32(fw_cfg, FW_CFG_INITRD_SIZE, initrd_size);
fw_cfg_add_bytes(fw_cfg, FW_CFG_INITRD_DATA, initrd_data, initrd_size);
stl_p(header+0x218, initrd_addr);
stl_p(header+0x21c, initrd_size);
setup_size = header[0x1f1];
if (setup_size == 0)
setup_size = 4;
setup_size = (setup_size+1)*512;
kernel_size -= setup_size;
setup = qemu_malloc(setup_size);
kernel = qemu_malloc(kernel_size);
fseek(f, 0, SEEK_SET);
if (fread(setup, 1, setup_size, f) != setup_size) {
fprintf(stderr, "fread() failed\n");
if (fread(kernel, 1, kernel_size, f) != kernel_size) {
fprintf(stderr, "fread() failed\n");
fclose(f);
memcpy(setup, header, MIN(sizeof(header), setup_size));
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_ADDR, prot_addr);
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_SIZE, kernel_size);
fw_cfg_add_bytes(fw_cfg, FW_CFG_KERNEL_DATA, kernel, kernel_size);
fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_ADDR, real_addr);
fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_SIZE, setup_size);
fw_cfg_add_bytes(fw_cfg, FW_CFG_SETUP_DATA, setup, setup_size);
option_rom[nb_option_roms] = "linuxboot.bin";
nb_option_roms++;
| 1threat
|
vba code to display multiple rows in excel : I want to display multiple rows with same name in excel sheet that I have created using vba code.. I have created a textbox in my excel sheet 1 and when I enter a name in the text box and click search button I want the multiple rows of the same person to be displayed in excel sheet 3..
Code:
I have created the excel sheet called "List" and the data in there is
NAME CITY
LAKHA LONDON
KIKI US
LAKHA US
I have a code here.
Sub finddata()
Dim erow As Long
Dim ws As Worksheet
Dim lastrow As Long
Dim count As Integer
lastrow = Sheets("List").Cells(Rows.count, 1).End(xlUp).Row
For x = 2 To lastrow
If Sheets("List").Cells(x, 1) = Sheet1.Range("E7") Then
Sheet3.Range("A2") = Sheets("List").Cells(x, 1)
Sheet3.Range("B2") = Sheets("List").Cells(x, 2)
End If
Next x
End Sub
Sub printdata()
Sheet3.Range("A1:B2").PrintPreview
'Sheet3.Range("A1:B2").PrintOut
End Sub
Sub Clear_Cells()
Sheets("Sheet3").Range("A2:B2").ClearContents
Sheets("Sheet1").Range("E7:E7").ClearContents
End Sub
But this only displays one row at a time...
Immediate answers please. I am in deadline...
| 0debug
|
void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size)
{
CirrusVGAState *s;
s = qemu_mallocz(sizeof(CirrusVGAState));
vga_common_init((VGAState *)s,
ds, vga_ram_base, vga_ram_offset, vga_ram_size);
cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);
s->console = graphic_console_init(s->ds, s->update, s->invalidate,
s->screen_dump, s->text_update, s);
}
| 1threat
|
def lcs_of_three(X, Y, Z, m, n, o):
L = [[[0 for i in range(o+1)] for j in range(n+1)]
for k in range(m+1)]
for i in range(m+1):
for j in range(n+1):
for k in range(o+1):
if (i == 0 or j == 0 or k == 0):
L[i][j][k] = 0
elif (X[i-1] == Y[j-1] and
X[i-1] == Z[k-1]):
L[i][j][k] = L[i-1][j-1][k-1] + 1
else:
L[i][j][k] = max(max(L[i-1][j][k],
L[i][j-1][k]),
L[i][j][k-1])
return L[m][n][o]
| 0debug
|
Where can I get aosp marshmallow rom (device:merlin) ? Will I have to build it from scratch? : <p>I want to port miui using aosp as base rom . I searched on the web but didn't find any aosp rom for my device.I owns a Moto g turbo(merlin).So will I have to make it from scratch from the instructions provided on aosp site.</p>
| 0debug
|
static int line_out_init (HWVoiceOut *hw, struct audsettings *as)
{
SpiceVoiceOut *out = container_of (hw, SpiceVoiceOut, hw);
struct audsettings settings;
#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
settings.freq = spice_server_get_best_playback_rate(NULL);
#else
settings.freq = SPICE_INTERFACE_PLAYBACK_FREQ;
#endif
settings.nchannels = SPICE_INTERFACE_PLAYBACK_CHAN;
settings.fmt = AUD_FMT_S16;
settings.endianness = AUDIO_HOST_ENDIANNESS;
audio_pcm_init_info (&hw->info, &settings);
hw->samples = LINE_OUT_SAMPLES;
out->active = 0;
out->sin.base.sif = &playback_sif.base;
qemu_spice_add_interface (&out->sin.base);
#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
spice_server_set_playback_rate(&out->sin, settings.freq);
#endif
return 0;
}
| 1threat
|
Singleton pattern usage for sqlite : <p>There is lot of stuff available on the internet on how to use singleton pattern for sqlite in android, my question is why use singleton pattern to communicate with sqlite database</p>
| 0debug
|
Communicate between two android apps : I am developing a unity android app and an android studio app. I want to open and close them using each other and to pass messages between them. How can I achieve this?
1. How to create a intent of the unity app in android studio?
2. How to invoke a method of unity app inside android studio app?
3. How to invoke a method of android studio app inside unity app?
I am completely new to android development. Even though there are similar questions, couldn't find a solution that worked for me. Thank you.
| 0debug
|
Getting 403 (Forbidden) when loading AWS CloudFront file : <p>I'm working on a video app and storing the files on AWS S3, using the default URL like <code>https://***.amazonaws.com/***</code> works fine but I have decided to use CloudFront which is faster for content delivery.</p>
<p>Using CF, I keep getting <code>403 (Forbidden)</code> using this URL <code>https://***.cloudfront.net/***</code>. Did I miss anything?</p>
<p>Everything works fine until I decide to load the contents from CloudFront which points to my bucket.</p>
<p>Any solution please?</p>
| 0debug
|
Instantiate File object in Microsoft Edge : <p>I'm trying to create an image file from a blob-object using the <a href="http://caniuse.com/#feat=fileapi" rel="noreferrer">File API</a> and then add it to a form to be sent via XHR. Works like a charm in chrome, but crashes the app in Microsoft Edge.</p>
<pre><code>let file = new File([blobContent], "image.png");
let form = new FormData();
form.append("file", file);
</code></pre>
<p>Are there any alternatives to the File API or workarounds to attach a file to the form? If I just add the blob to the form it's not recognized as an image.</p>
<p>Thanks!</p>
| 0debug
|
How to create a auto blog system for website : <p>I want to crate a blog website where people can create their blog on post it on my website. But i dont want to do it manually takimg each post and uploading by my self</p>
<p>How can i create a coding for it tht people create the blog and it gets uploaded by itself on the server.</p>
| 0debug
|
Single letter words in camelCase, what is a standard for handling these? : <p>I'm trying to group together an object's vertex X components in a vector, like structure of array style. </p>
<p>Naturally this is the way.</p>
<pre><code>Vec xComponents; or Vec xVals; or simply Vec x;
</code></pre>
<p>However sometimes I want to specify in the id what x components belong to, I think about doing this.</p>
<pre><code>Vec objXComponents;
</code></pre>
<p>However, the two capitals next to each other seem to break a rule about camel case, and may make it slightly less readable.</p>
<p>What should I do for this case? I know you may say just cull the components post-fix and use <code>objX</code>, and while I think that's OK for this case I would like a general solution / standard.</p>
<p>I tried finding if microsoft has a standard for this but I cant find it on their <a href="https://msdn.microsoft.com/en-us/library/ms229043.aspx" rel="noreferrer">style guidlines</a>.</p>
| 0debug
|
Owin claims - Add multiple ClaimTypes.Role : <p>I have an application in which users can be assigned the following roles: </p>
<ul>
<li>SuperAdmin</li>
<li>Admin</li>
<li>User</li>
</ul>
<p>One user may have assigned two or more roles, eg. both SuperAdmin and User. My application uses claims, and therefore i want to authenticate user roles through claims too. like: </p>
<pre><code>[Authorize(Roles="Admin")]
</code></pre>
<p>Unfortunately, i dont know how i can add multiple roles to my ClaimTypes.Role. I have the following code:</p>
<pre><code>var identity = new ClaimsIdentity(new[] {
new Claim(ClaimTypes.Name, name),
new Claim(ClaimTypes.Email, email),
new Claim(ClaimTypes.Role, "User", "Admin", "SuperAdmin")
},
"ApplicationCookie");
</code></pre>
<p>As you can see, i tried to add more roles for the sake of illustrating, but obviously its done in a wrong way, and therefore doesn't work.
Any help is therefore much appreciated.</p>
| 0debug
|
static int v9fs_synth_lsetxattr(FsContext *ctx, V9fsPath *path,
const char *name, void *value,
size_t size, int flags)
{
errno = ENOTSUP;
return -1;
}
| 1threat
|
void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
{
unsigned i;
for(i=0; i<num_pixels; i++)
{
#ifdef WORDS_BIGENDIAN
dst[3]= palette[ src[i]*4+2 ];
dst[2]= palette[ src[i]*4+1 ];
dst[1]= palette[ src[i]*4+0 ];
#else
dst[0]= palette[ src[i]*4+2 ];
dst[1]= palette[ src[i]*4+1 ];
dst[2]= palette[ src[i]*4+0 ];
#endif
dst+= 4;
}
}
| 1threat
|
how to use listeners in vue.js for events like scroll and windows resizing : <p>Hello i am learning vuejs and was converting one of my projects into vuejs i wanted to know that i can write my custom functions in methods and call those in mounted hook i wanted to know how do i use listeners in vuejs.</p>
<p>also can i used my jquery by importing in vue project</p>
<p>The event listener documentation on vue website states only v-on and click example but no examples are for windows listeners</p>
<pre><code>jQuery(document).ready(function(){
//cache DOM elements
var mainContent = $('.cd-main-content'),
header = $('.cd-main-header'),
sidebar = $('.cd-side-nav'),
sidebarTrigger = $('.cd-nav-trigger'),
topNavigation = $('.cd-top-nav'),
searchForm = $('.cd-search'),
accountInfo = $('.account');
//on resize, move search and top nav position according to window width
var resizing = false;
moveNavigation();
$(window).on('resize', function(){
if( !resizing ) {
(!window.requestAnimationFrame) ? setTimeout(moveNavigation, 300) : window.requestAnimationFrame(moveNavigation);
resizing = true;
}
});
//on window scrolling - fix sidebar nav
var scrolling = false;
checkScrollbarPosition();
$(window).on('scroll', function(){
if( !scrolling ) {
(!window.requestAnimationFrame) ? setTimeout(checkScrollbarPosition, 300) : window.requestAnimationFrame(checkScrollbarPosition);
scrolling = true;
}
});
//mobile only - open sidebar when user clicks the hamburger menu
sidebarTrigger.on('click', function(event){
event.preventDefault();
$([sidebar, sidebarTrigger]).toggleClass('nav-is-visible');
});
//click on item and show submenu
$('.has-children > a').on('click', function(event){
var mq = checkMQ(),
selectedItem = $(this);
if( mq == 'mobile' || mq == 'tablet' ) {
event.preventDefault();
if( selectedItem.parent('li').hasClass('selected')) {
selectedItem.parent('li').removeClass('selected');
} else {
sidebar.find('.has-children.selected').removeClass('selected');
accountInfo.removeClass('selected');
selectedItem.parent('li').addClass('selected');
}
}
});
//click on account and show submenu - desktop version only
accountInfo.children('a').on('click', function(event){
var mq = checkMQ(),
selectedItem = $(this);
if( mq == 'desktop') {
event.preventDefault();
accountInfo.toggleClass('selected');
sidebar.find('.has-children.selected').removeClass('selected');
}
});
$(document).on('click', function(event){
if( !$(event.target).is('.has-children a') ) {
sidebar.find('.has-children.selected').removeClass('selected');
accountInfo.removeClass('selected');
}
});
//on desktop - differentiate between a user trying to hover over a dropdown item vs trying to navigate into a submenu's contents
sidebar.children('ul').menuAim({
activate: function(row) {
$(row).addClass('hover');
},
deactivate: function(row) {
$(row).removeClass('hover');
},
exitMenu: function() {
sidebar.find('.hover').removeClass('hover');
return true;
},
submenuSelector: ".has-children",
});
function checkMQ() {
//check if mobile or desktop device
return window.getComputedStyle(document.querySelector('.cd-main-content'), '::before').getPropertyValue('content').replace(/'/g, "").replace(/"/g, "");
}
function moveNavigation(){
var mq = checkMQ();
if ( mq == 'mobile' && topNavigation.parents('.cd-side-nav').length == 0 ) {
detachElements();
topNavigation.appendTo(sidebar);
searchForm.removeClass('is-hidden').prependTo(sidebar);
} else if ( ( mq == 'tablet' || mq == 'desktop') && topNavigation.parents('.cd-side-nav').length > 0 ) {
detachElements();
searchForm.insertAfter(header.find('.cd-logo'));
topNavigation.appendTo(header.find('.cd-nav'));
}
checkSelected(mq);
resizing = false;
}
function detachElements() {
topNavigation.detach();
searchForm.detach();
}
function checkSelected(mq) {
//on desktop, remove selected class from items selected on mobile/tablet version
if( mq == 'desktop' ) $('.has-children.selected').removeClass('selected');
}
function checkScrollbarPosition() {
var mq = checkMQ();
if( mq != 'mobile' ) {
var sidebarHeight = sidebar.outerHeight(),
windowHeight = $(window).height(),
mainContentHeight = mainContent.outerHeight(),
scrollTop = $(window).scrollTop();
( ( scrollTop + windowHeight > sidebarHeight ) && ( mainContentHeight - sidebarHeight != 0 ) ) ? sidebar.addClass('is-fixed').css('bottom', 0) : sidebar.removeClass('is-fixed').attr('style', '');
}
scrolling = false;
}
});
</code></pre>
| 0debug
|
long do_rt_sigreturn(CPUX86State *env)
{
abi_ulong frame_addr;
struct rt_sigframe *frame;
sigset_t set;
frame_addr = env->regs[R_ESP] - 4;
trace_user_do_rt_sigreturn(env, frame_addr);
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
goto badframe;
target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
set_sigmask(&set);
if (restore_sigcontext(env, &frame->uc.tuc_mcontext)) {
goto badframe;
}
if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe, uc.tuc_stack), 0,
get_sp_from_cpustate(env)) == -EFAULT) {
goto badframe;
}
unlock_user_struct(frame, frame_addr, 0);
return -TARGET_QEMU_ESIGRETURN;
badframe:
unlock_user_struct(frame, frame_addr, 0);
force_sig(TARGET_SIGSEGV);
return 0;
}
| 1threat
|
Pandas Counting Unique Rows : <p>I have a pandas data frame similar to:</p>
<pre><code>ColA ColB
1 1
1 1
1 1
1 2
1 2
2 1
3 2
</code></pre>
<p>I want an output that has the same function as <a href="https://docs.python.org/2/library/collections.html#collections.Counter" rel="noreferrer">Counter</a>. I need to know how many time each row appears (with all of the columns being the same.</p>
<p>In this case the proper output would be:</p>
<pre><code>ColA ColB Count
1 1 3
1 2 2
2 1 1
3 2 1
</code></pre>
<p>I have tried something of the sort:</p>
<pre><code>df.groupby(['ColA','ColB']).ColA.count()
</code></pre>
<p>but this gives me some ugly output I am having trouble formatting</p>
| 0debug
|
def count_list(input_list):
return (len(input_list))**2
| 0debug
|
How to store user input locally using JavaScript For user bio : I'm a coding noob. I'm creating a cross-platform app and I want the user bio to be stored locally and stay there after refresh and close/reopen.
Thanks
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
var newBio = document.getElementById("bio").value;
var storeBio = localStorage.setItem(newBio);
document.getElementById("bio").innerHTML = localStorage.getItem(storeBio);
<!-- language: lang-html -->
<input id="bio" type="text" name="search" placeholder="Bio" onmouseout="showBotNav(); saveBio()"><br>
<!-- end snippet -->
| 0debug
|
Write a bash script to subdivide an given subnet into a pre-defined number of smaller subnets. : This question was recently asked in an interview.
**Question:** Write a bash script to subdivide an given subnet into a pre-defined number of smaller subnets.
After division IP addresses shouldn't be wasted, i.e. accumulation of your subdivisions should make up the divided subnet.
Every subnet has 3 IP addresses reserved and not usable by hosts: network, broadcast, gateway.
Show network/broadcast address, number of hosts and assign gateway. Gateway should be first IP available in divided subnet. Examples:
INPUT: `./subnetter.sh 192.168.0.0/24 3`
OUTPUT:
subnet=192.168.0.0/25 network=192.168.0.0 broadcast=192.168.0.127 gateway=192.168.0.1 hosts=125
subnet=192.168.0.128/26 network=192.168.0.128 broadcast=192.168.0.191 gateway=192.168.0.129 hosts=61
subnet=192.168.0.192/26 network=192.168.0.192 broadcast=192.168.0.255 gateway=192.168.0.193 hosts=61
INPUT: `./subnetter.sh 192.168.0.0/24 4`
OUTPUT:
subnet=192.168.0.0/26 network=192.168.0.0 broadcast=192.168.0.63 gateway=192.168.0.1 hosts=61
subnet=192.168.0.64/26 network=192.168.0.64 broadcast=192.168.0.127 gateway=192.168.0.65 hosts=61
subnet=192.168.0.128/26 network=192.168.0.128 broadcast=192.168.0.191 gateway=192.168.0.129 hosts=61
subnet=192.168.0.192/26 network=192.168.0.192 broadcast=192.168.0.255 gateway=192.168.0.193 hosts=61
INPUT: `./subnetter.sh 10.55.10.64/28 2`
OUTPUT:
subnet=10.55.10.64/29 network=10.55.10.64 broadcast=10.55.10.71 gateway=10.55.10.65 hosts=5
subnet=10.55.10.72/29 network=10.55.10.72 broadcast=10.55.10.79 gateway=10.55.10.73 hosts=5
First of all, I am trying to analyse what logic is used to divide the subnets.
Secondly, I am trying to use the `ipcalc` command to get outputs but no luck.
Thanks
| 0debug
|
static int common_init(AVCodecContext *avctx){
SnowContext *s = avctx->priv_data;
int width, height;
int level, orientation, plane_index, dec;
s->avctx= avctx;
dsputil_init(&s->dsp, avctx);
#define mcf(dx,dy)\
s->dsp.put_qpel_pixels_tab [0][dy+dx/4]=\
s->dsp.put_no_rnd_qpel_pixels_tab[0][dy+dx/4]=\
mc_block ## dx ## dy;
mcf( 0, 0)
mcf( 4, 0)
mcf( 8, 0)
mcf(12, 0)
mcf( 0, 4)
mcf( 4, 4)
mcf( 8, 4)
mcf(12, 4)
mcf( 0, 8)
mcf( 4, 8)
mcf( 8, 8)
mcf(12, 8)
mcf( 0,12)
mcf( 4,12)
mcf( 8,12)
mcf(12,12)
#define mcfh(dx,dy)\
s->dsp.put_pixels_tab [0][dy/4+dx/8]=\
s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\
mc_block_hpel ## dx ## dy;
mcfh(0, 0)
mcfh(8, 0)
mcfh(0, 8)
mcfh(8, 8)
dec= s->spatial_decomposition_count= 5;
s->spatial_decomposition_type= avctx->prediction_method;
s->chroma_h_shift= 1;
s->chroma_v_shift= 1;
s->b_width = (s->avctx->width +(1<<dec)-1)>>dec;
s->b_height= (s->avctx->height+(1<<dec)-1)>>dec;
s->spatial_dwt_buffer= av_mallocz(s->b_width*s->b_height*sizeof(DWTELEM)<<(2*dec));
s->pred_buffer= av_mallocz(s->b_width*s->b_height*sizeof(DWTELEM)<<(2*dec));
s->mv_scale= (s->avctx->flags & CODEC_FLAG_QPEL) ? 2 : 4;
for(plane_index=0; plane_index<3; plane_index++){
int w= s->avctx->width;
int h= s->avctx->height;
if(plane_index){
w>>= s->chroma_h_shift;
h>>= s->chroma_v_shift;
}
s->plane[plane_index].width = w;
s->plane[plane_index].height= h;
for(level=s->spatial_decomposition_count-1; level>=0; level--){
for(orientation=level ? 1 : 0; orientation<4; orientation++){
SubBand *b= &s->plane[plane_index].band[level][orientation];
b->buf= s->spatial_dwt_buffer;
b->level= level;
b->stride= s->plane[plane_index].width << (s->spatial_decomposition_count - level);
b->width = (w + !(orientation&1))>>1;
b->height= (h + !(orientation>1))>>1;
if(orientation&1) b->buf += (w+1)>>1;
if(orientation>1) b->buf += b->stride>>1;
if(level)
b->parent= &s->plane[plane_index].band[level-1][orientation];
}
w= (w+1)>>1;
h= (h+1)>>1;
}
}
s->mb_band.stride= s->mv_band[0].stride= s->mv_band[1].stride=
s->mb_band.width = s->mv_band[0].width = s->mv_band[1].width = (s->avctx->width + 15)>>4;
s->mb_band.height= s->mv_band[0].height= s->mv_band[1].height= (s->avctx->height+ 15)>>4;
s->mb_band .buf= av_mallocz(s->mb_band .stride * s->mb_band .height*sizeof(DWTELEM));
s->mv_band[0].buf= av_mallocz(s->mv_band[0].stride * s->mv_band[0].height*sizeof(DWTELEM));
s->mv_band[1].buf= av_mallocz(s->mv_band[1].stride * s->mv_band[1].height*sizeof(DWTELEM));
reset_contexts(s);
s->avctx->get_buffer(s->avctx, &s->mconly_picture);
return 0;
}
| 1threat
|
Perl: select elements of array using array of integers : Is it possible to select specifics elements of an array using an array of integers(indexes). I know that this can be done easily with a loop but was hoping for a one line solution.
Example/attempts
@arr = qw(a b c d e f);
@arr2 = qw( 0 2 4);
Rather than
@arr3 = @arr[0,2,4];
use @arr2 as set of integers that you wan't selected
@arr3 = @arr[@arr2]; #won't work as "@arr2" returns number of elements
@arr3 = @arr[join(','@arr2)] #won't work as join returns a string
| 0debug
|
static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size)
{
const uint8_t *s = src;
const uint8_t *end;
const uint8_t *mm_end;
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
__asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 15;
while (s < mm_end) {
__asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
"punpckldq 8%1, %%mm0 \n\t"
"punpckldq 12%1, %%mm3 \n\t"
"movq %%mm0, %%mm1 \n\t"
"movq %%mm0, %%mm2 \n\t"
"movq %%mm3, %%mm4 \n\t"
"movq %%mm3, %%mm5 \n\t"
"psllq $8, %%mm0 \n\t"
"psllq $8, %%mm3 \n\t"
"pand %%mm7, %%mm0 \n\t"
"pand %%mm7, %%mm3 \n\t"
"psrlq $5, %%mm1 \n\t"
"psrlq $5, %%mm4 \n\t"
"pand %%mm6, %%mm1 \n\t"
"pand %%mm6, %%mm4 \n\t"
"psrlq $19, %%mm2 \n\t"
"psrlq $19, %%mm5 \n\t"
"pand %2, %%mm2 \n\t"
"pand %2, %%mm5 \n\t"
"por %%mm1, %%mm0 \n\t"
"por %%mm4, %%mm3 \n\t"
"por %%mm2, %%mm0 \n\t"
"por %%mm5, %%mm3 \n\t"
"psllq $16, %%mm3 \n\t"
"por %%mm3, %%mm0 \n\t"
MOVNTQ" %%mm0, %0 \n\t"
:"=m"(*d):"m"(*s),"m"(blue_16mask):"memory");
d += 4;
s += 16;
}
__asm__ volatile(SFENCE:::"memory");
__asm__ volatile(EMMS:::"memory");
while (s < end) {
register int rgb = *(const uint32_t*)s; s += 4;
*d++ = ((rgb&0xF8)<<8) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>19);
}
}
| 1threat
|
static gboolean tcp_chr_accept(QIOChannel *channel,
GIOCondition cond,
void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
QIOChannelSocket *sioc;
sioc = qio_channel_socket_accept(QIO_CHANNEL_SOCKET(channel),
NULL);
if (!sioc) {
return TRUE;
}
if (s->do_telnetopt) {
tcp_chr_telnet_init(QIO_CHANNEL(sioc));
}
tcp_chr_new_client(chr, sioc);
object_unref(OBJECT(sioc));
return TRUE;
}
| 1threat
|
static int apb_pci_bridge_initfn(PCIDevice *dev)
{
int rc;
rc = pci_bridge_initfn(dev);
if (rc < 0) {
return rc;
}
pci_config_set_vendor_id(dev->config, PCI_VENDOR_ID_SUN);
pci_config_set_device_id(dev->config, PCI_DEVICE_ID_SUN_SIMBA);
pci_set_word(dev->config + PCI_COMMAND,
PCI_COMMAND_MEMORY);
pci_set_word(dev->config + PCI_STATUS,
PCI_STATUS_FAST_BACK | PCI_STATUS_66MHZ |
PCI_STATUS_DEVSEL_MEDIUM);
pci_set_byte(dev->config + PCI_REVISION_ID, 0x11);
return 0;
}
| 1threat
|
jspm / jQuery / TypeScript - module "jquery" has no default export : <p>I'm trying to bootstrap a web app using TypeScript and jspm & system.js for module loading. I'm not getting very far. After installing jspm, and using it to install jQuery:</p>
<pre><code>jspm install jquery
</code></pre>
<p>And the basics:</p>
<pre><code><script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
System.import('main');
</script>
</code></pre>
<p>main.ts:</p>
<pre><code>import $ from "jquery";
export class Application {
constructor() {
console.log($);
}
}
</code></pre>
<p>The TypeScript won't compile because "Module 'jquery' has no default export.</p>
<p>The generated config.js has the correct mapping: "jquery": "npm:jquery@2.2.0"</p>
| 0debug
|
Visual Studio Code to use node version specified by NVM : <p>Is it possible for VS Code to use node version specified by NVM? </p>
<p>I have 6.9.2 installed locally. Even after switching to another version, from the OS X terminal (not the VS Code terminal), restarting VS Code, VS Code still shows using 6.9.2.</p>
<p><strong>OS X terminal</strong></p>
<pre><code>MacBook-Pro-3:~ mac$ node -v
v7.8.0
</code></pre>
<p><strong>VS Code Terminal</strong></p>
<pre><code>MacBook-Pro-3:QB-Invoice-API mac$ node -v
v6.9.2
</code></pre>
| 0debug
|
When is it better to use static variable? : <p>I am wondering why sometimes I see code with static variable? When is it better to use static variable instead of "normal" variable? If its value do not change from an istance to another, is it not better to use final variable? </p>
| 0debug
|
static void avc_luma_midh_qrt_8w_msa(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
int32_t height, uint8_t horiz_offset)
{
uint32_t multiple8_cnt;
for (multiple8_cnt = 2; multiple8_cnt--;) {
avc_luma_midh_qrt_4w_msa(src, src_stride, dst, dst_stride, height,
horiz_offset);
src += 4;
dst += 4;
}
}
| 1threat
|
Elm decoding unknown json structure : <p>I've just started working with Elm to do some front-end prototyping using a Rest API I'm working on. In general, the API returns "reasonable" data structures that can be decoded because the keys and value-types are well-known, but several resource types return a <code>data</code> entry that just has raw json that has no predetermined structure.</p>
<p>Everything I've read so far seems to assume you know the structure of the data you're decoding, whereas in plain js it's relatively easy to loop over the keys and reflect on the types in order to determine how they should be handled at runtime. I'm not seeing a clear path toward handling this kind of data in Elm yet.</p>
<p>E.g.,</p>
<pre><code>{
"name":"foo",
"data": {
"bar": [{"baz":123}, "quux"]
},
...
}
</code></pre>
<p>I'd like to know if it is currently possible to parse the value of the <code>data</code> entry with something akin to</p>
<pre><code>function go(obj)
for key in keys(foo)
if foo[key] is an object
go(foo[k])
else if foo[key] is an array
map(go, foo[k])
...
</code></pre>
<p>Specifically:</p>
<ol>
<li>Is it currently possible to handle unknown, possibly deeply nested and heterogeneous json data in Elm?</li>
<li>If so, can you give me the key concept or high level intuition on how the author(s) intended data like this to be decoded?</li>
</ol>
| 0debug
|
static void unmanageable_intercept(S390CPU *cpu, const char *str, int pswoffset)
{
CPUState *cs = CPU(cpu);
error_report("Unmanageable %s! CPU%i new PSW: 0x%016lx:%016lx",
str, cs->cpu_index, ldq_phys(cs->as, cpu->env.psa + pswoffset),
ldq_phys(cs->as, cpu->env.psa + pswoffset + 8));
s390_cpu_halt(cpu);
guest_panicked();
}
| 1threat
|
FATAL EXCEPTION: main android.os.NetworkOnMainThreadException : <p>i want upload images but cant run this because show:
FATAL EXCEPTION: main
android.os.NetworkOnMainThreadException`public class FileUploader {
private final String boundary;
private static final String LINE_FEED = "\r\n";
private HttpURLConnection httpConn;
private String charset;
private OutputStream outputStream;
private PrintWriter writer;</p>
<pre><code>public FileUploader(String requestURL, String charset)
throws IOException {
this.charset = charset;
// creates a unique boundary based on time stamp
boundary = "===" + System.currentTimeMillis() + "===";
URL url = new URL(requestURL);
httpConn = (HttpURLConnection) url.openConnection();
httpConn.setUseCaches(false);
httpConn.setDoOutput(true); // indicates POST method
httpConn.setDoInput(true);
httpConn.setRequestProperty("Content-Type",
"multipart/form-data; boundary=" + boundary);
httpConn.setRequestProperty("User-Agent", "CodeJava Agent");
httpConn.setRequestProperty("Test", "Bonjour");
outputStream = httpConn.getOutputStream();
writer = new PrintWriter(new OutputStreamWriter(outputStream, charset),
true);
}
/**
* Adds a form field to the request
* @param name field name
* @param value field value
*/
public void addFormField(String name, String value) {
writer.append("--" + boundary).append(LINE_FEED);
writer.append("Content-Disposition: form-data; name=\"" + name + "\"")
.append(LINE_FEED);
writer.append("Content-Type: text/plain; charset=" + charset).append(
LINE_FEED);
writer.append(LINE_FEED);
writer.append(value).append(LINE_FEED);
writer.flush();
}
/**
* Adds a upload file section to the request
* @param fieldName name attribute in <input type="file" name="..." />
* @param uploadFile a File to be uploaded
* @throws IOException
*/
public void addFilePart(String fieldName, File uploadFile)
throws IOException {
String fileName = uploadFile.getName();
writer.append("--" + boundary).append(LINE_FEED);
writer.append(
"Content-Disposition: form-data; name=\"" + fieldName
+ "\"; filename=\"" + fileName + "\"")
.append(LINE_FEED);
writer.append(
"Content-Type: "
+ URLConnection.guessContentTypeFromName(fileName))
.append(LINE_FEED);
writer.append("Content-Transfer-Encoding: binary").append(LINE_FEED);
writer.append(LINE_FEED);
writer.flush();
FileInputStream inputStream = new FileInputStream(uploadFile);
byte[] buffer = new byte[4096];
int bytesRead = -1;
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
outputStream.flush();
inputStream.close();
writer.append(LINE_FEED);
writer.flush();
}
/**
* Adds a header field to the request.
* @param name - name of the header field
* @param value - value of the header field
*/
public void addHeaderField(String name, String value) {
writer.append(name + ": " + value).append(LINE_FEED);
writer.flush();
}
/**
* Completes the request and receives response from the server.
* @return a list of Strings as response in case the server returned
* status OK, otherwise an exception is thrown.
* @throws IOException
*/
public List<String> finish() throws IOException {
List<String> response = new ArrayList<String>();
writer.append(LINE_FEED).flush();
writer.append("--" + boundary + "--").append(LINE_FEED);
writer.close();
// checks server's status code first
int status = httpConn.getResponseCode();
if (status == HttpURLConnection.HTTP_OK) {
BufferedReader reader = new BufferedReader(new InputStreamReader(
httpConn.getInputStream()));
String line = null;
while ((line = reader.readLine()) != null) {
response.add(line);
}
reader.close();
httpConn.disconnect();
} else {
throw new IOException("Server returned non-OK status: " + status);
}
return response;
}
</code></pre>
<p>}
`</p>
<p>please help me :(</p>
| 0debug
|
Xcode Swift AutoLayout Not Working : In my storyboard auto layout is producing this [result][1] I wanted a result like [this][2].The problem this that the result I want is without auto layout.
[1]: https://i.stack.imgur.com/5AWJp.png
[2]: https://i.stack.imgur.com/Z6Q0f.png
[3]: https://i.stack.imgur.com/5PdEl.png
| 0debug
|
navigation to the webpage was canceled webbrowser control c# : <p>i started a create a simple web browser...
when i code it web page is not loading...</p>
<pre><code>{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("textBox1.Text");
}
}
}
</code></pre>
<p>This is the error when i go to a web page.</p>
<p><a href="https://i.stack.imgur.com/G9tZn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G9tZn.jpg" alt="enter image description here"></a> </p>
| 0debug
|
static void gen_extu(int ot, TCGv reg)
{
switch(ot) {
case OT_BYTE:
tcg_gen_ext8u_tl(reg, reg);
break;
case OT_WORD:
tcg_gen_ext16u_tl(reg, reg);
break;
case OT_LONG:
tcg_gen_ext32u_tl(reg, reg);
break;
default:
break;
}
}
| 1threat
|
How would I import an image to an arduino and convert it to a binary bitstream? : Hi I am working on a project to trasnmit data using an array of LEDs, however Im having trouble importing and image to an arduino. once I have imported the image I would like to convert it in to a binary from so I can transmit the data stream. Could anyone help me find a way to do this or any references.
| 0debug
|
void vm_stop(int reason)
{
do_vm_stop(reason);
}
| 1threat
|
display Column value according to need in sql : if i have a column in which ten digit values occurs like Column A = 11111000 so how to show this value in sql like (List,Add,Edit,Delete,Export) in sql.
there is a condition means if first position have 1 then it show List, If second Position have 1 it show Add, third position have 1 then Edit, fourth position have 1 then Delete, fifth position have 1 then Export.
| 0debug
|
A simple "for loop" doesnt work - django : <p>When i do a simple code in django, its just shows me the next messege:</p>
<pre><code>Could not parse the remainder: '[0,1,2]' from '[0,1,2]'
</code></pre>
<p>And there is the code:</p>
<pre><code> {% for i in [0,1,2] %}
<div class="coverw-block-welcome">
</div>
{% endfor %}
</code></pre>
<p>The smae thing if i do "range".
For some reason django dont let me using "for loop".
Its a problem with django</p>
| 0debug
|
static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
{
if(codec && codec->pix_fmts){
const enum PixelFormat *p= codec->pix_fmts;
if(st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL){
if(st->codec->codec_id==CODEC_ID_MJPEG){
p= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE};
}else if(st->codec->codec_id==CODEC_ID_LJPEG){
p= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE};
}
}
for(; *p!=-1; p++){
if(*p == st->codec->pix_fmt)
break;
}
if (*p == -1) {
av_log(NULL, AV_LOG_WARNING,
"Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
av_pix_fmt_descriptors[st->codec->pix_fmt].name,
codec->name,
av_pix_fmt_descriptors[codec->pix_fmts[0]].name);
st->codec->pix_fmt = codec->pix_fmts[0];
}
}
}
| 1threat
|
how to split long lines for fmt.sprintf : <p>I have a very long line in fmt.Sprintf. How do I split it in the code? I don't want to put everything in a single line so the code looks ugly.</p>
<pre><code>fmt.Sprintf("a:%s, b:%s ...... this goes really long")
</code></pre>
| 0debug
|
python code not working for datetime and if statements : import datetime
import csv
format = "%H%M"
today = datetime.datetime.today()
s = today.strftime(format)
print s
if s == 1029:
print ("Good")
else:
print ("Bad")
why doesn't this code work? it just prints 's' and "bad"
Please
| 0debug
|
Run command in Docker Container only on the first start : <p>I have a Docker Image which uses a Script (<code>/bin/bash /init.sh</code>) as Entrypoint. I would like to execute this script only on the first start of a container. It should be omitted when the containers is restarted or started again after a crash of the docker daemon.</p>
<p>Is there any way to do this with docker itself, or do if have to implement some kind of check in the script?</p>
| 0debug
|
static void scsi_command_complete(void *opaque, int ret)
{
SCSIGenericReq *r = (SCSIGenericReq *)opaque;
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);
r->req.aiocb = NULL;
s->driver_status = r->io_header.driver_status;
if (s->driver_status & SG_ERR_DRIVER_SENSE)
s->senselen = r->io_header.sb_len_wr;
if (ret != 0)
r->req.status = BUSY;
else {
if (s->driver_status & SG_ERR_DRIVER_TIMEOUT) {
r->req.status = BUSY;
BADF("Driver Timeout\n");
} else if (r->io_header.status)
r->req.status = r->io_header.status;
else if (s->driver_status & SG_ERR_DRIVER_SENSE)
r->req.status = CHECK_CONDITION;
else
r->req.status = GOOD;
}
DPRINTF("Command complete 0x%p tag=0x%x status=%d\n",
r, r->req.tag, r->req.status);
scsi_req_complete(&r->req);
}
| 1threat
|
static int vmdk_add_extent(BlockDriverState *bs,
BlockDriverState *file, bool flat, int64_t sectors,
int64_t l1_offset, int64_t l1_backup_offset,
uint32_t l1_size,
int l2_size, uint64_t cluster_sectors,
VmdkExtent **new_extent)
{
VmdkExtent *extent;
BDRVVmdkState *s = bs->opaque;
if (cluster_sectors > 0x200000) {
error_report("invalid granularity, image may be corrupt");
return -EINVAL;
}
if (l1_size > 512 * 1024 * 1024) {
error_report("L1 size too big");
return -EFBIG;
}
s->extents = g_realloc(s->extents,
(s->num_extents + 1) * sizeof(VmdkExtent));
extent = &s->extents[s->num_extents];
s->num_extents++;
memset(extent, 0, sizeof(VmdkExtent));
extent->file = file;
extent->flat = flat;
extent->sectors = sectors;
extent->l1_table_offset = l1_offset;
extent->l1_backup_table_offset = l1_backup_offset;
extent->l1_size = l1_size;
extent->l1_entry_sectors = l2_size * cluster_sectors;
extent->l2_size = l2_size;
extent->cluster_sectors = cluster_sectors;
if (s->num_extents > 1) {
extent->end_sector = (*(extent - 1)).end_sector + extent->sectors;
} else {
extent->end_sector = extent->sectors;
}
bs->total_sectors = extent->end_sector;
if (new_extent) {
*new_extent = extent;
}
return 0;
}
| 1threat
|
cannot read property 'apply' of undefined gulp : <p>I am trying to use the ng-factory generator to scaffold a new project to build an angularjs component. After the project has been created with the yo ng-factory command, I tried to run it using the gulp serve task but found the following error:</p>
<pre><code>c:\projects\bywebclient>gulp serve
[11:20:51] Loading C:\projects\bywebclient\gulp_tasks\browsersync.js
[11:20:52] Loading C:\projects\bywebclient\gulp_tasks\karma.js
[11:20:57] Loading C:\projects\bywebclient\gulp_tasks\misc.js
[11:20:57] Loading C:\projects\bywebclient\gulp_tasks\webpack.js
[11:21:07] Using gulpfile c:\projects\bywebclient\gulpfile.js
C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
</code></pre>
<p>^</p>
<blockquote>
<p>TypeError: Cannot read property 'apply' of undefined<br>
at C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:
19<br><br>
at _combinedTickCallback (internal/process/next_tick.js:67:7)<br>
at process._tickCallback (internal/process/next_tick.js:98:9)<br>
at Module.runMain (module.js:577:11)<br>
at run (bootstrap_node.js:352:7)<br>
at startup (bootstrap_node.js:144:9)<br>
at bootstrap_node.js:467:3<br></p>
</blockquote>
<p>Am I missing something? I already tried to run again the npm install</p>
<p>Thanks,
Atul Kale</p>
| 0debug
|
static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
{
int read_result;
MMSSCPacketType packet_type= -1;
MMSContext *mms = &mmst->mms;
for(;;) {
read_result = url_read_complete(mms->mms_hd, mms->in_buffer, 8);
if (read_result != 8) {
if(read_result < 0) {
av_log(NULL, AV_LOG_ERROR,
"Error reading packet header: %d (%s)\n",
read_result, strerror(read_result));
packet_type = SC_PKT_CANCEL;
} else {
av_log(NULL, AV_LOG_ERROR,
"The server closed the connection\n");
packet_type = SC_PKT_NO_DATA;
}
return packet_type;
}
if(AV_RL32(mms->in_buffer + 4)==0xb00bface) {
int length_remaining, hr;
mmst->incoming_flags= mms->in_buffer[3];
read_result= url_read_complete(mms->mms_hd, mms->in_buffer+8, 4);
if(read_result != 4) {
av_log(NULL, AV_LOG_ERROR,
"Reading command packet length failed: %d (%s)\n",
read_result,
read_result < 0 ? strerror(read_result) :
"The server closed the connection");
return read_result < 0 ? read_result : AVERROR_IO;
}
length_remaining= AV_RL32(mms->in_buffer+8) + 4;
av_dlog(NULL, "Length remaining is %d\n", length_remaining);
if (length_remaining < 0
|| length_remaining > sizeof(mms->in_buffer) - 12) {
av_log(NULL, AV_LOG_ERROR,
"Incoming packet length %d exceeds bufsize %zu\n",
length_remaining, sizeof(mms->in_buffer) - 12);
return AVERROR_INVALIDDATA;
}
read_result = url_read_complete(mms->mms_hd, mms->in_buffer + 12,
length_remaining) ;
if (read_result != length_remaining) {
av_log(NULL, AV_LOG_ERROR,
"Reading pkt data (length=%d) failed: %d (%s)\n",
length_remaining, read_result,
read_result < 0 ? strerror(read_result) :
"The server closed the connection");
return read_result < 0 ? read_result : AVERROR_IO;
}
packet_type= AV_RL16(mms->in_buffer+36);
hr = AV_RL32(mms->in_buffer + 40);
if (hr) {
av_log(NULL, AV_LOG_ERROR,
"Server sent a message with packet type 0x%x and error status code 0x%08x\n", packet_type, hr);
return AVERROR_UNKNOWN;
}
} else {
int length_remaining;
int packet_id_type;
int tmp;
tmp = AV_RL16(mms->in_buffer + 6);
length_remaining = (tmp - 8) & 0xffff;
mmst->incoming_packet_seq = AV_RL32(mms->in_buffer);
packet_id_type = mms->in_buffer[4];
mmst->incoming_flags = mms->in_buffer[5];
if (length_remaining < 0
|| length_remaining > sizeof(mms->in_buffer) - 8) {
av_log(NULL, AV_LOG_ERROR,
"Data length %d is invalid or too large (max=%zu)\n",
length_remaining, sizeof(mms->in_buffer));
return AVERROR_INVALIDDATA;
}
mms->remaining_in_len = length_remaining;
mms->read_in_ptr = mms->in_buffer;
read_result= url_read_complete(mms->mms_hd, mms->in_buffer, length_remaining);
if(read_result != length_remaining) {
av_log(NULL, AV_LOG_ERROR,
"Failed to read packet data of size %d: %d (%s)\n",
length_remaining, read_result,
read_result < 0 ? strerror(read_result) :
"The server closed the connection");
return read_result < 0 ? read_result : AVERROR_IO;
}
if(packet_id_type == mmst->header_packet_id) {
packet_type = SC_PKT_ASF_HEADER;
if(!mms->header_parsed) {
void *p = av_realloc(mms->asf_header,
mms->asf_header_size + mms->remaining_in_len);
if (!p) {
av_freep(&mms->asf_header);
return AVERROR(ENOMEM);
}
mms->asf_header = p;
memcpy(mms->asf_header + mms->asf_header_size,
mms->read_in_ptr, mms->remaining_in_len);
mms->asf_header_size += mms->remaining_in_len;
}
if (mmst->incoming_flags == 0x04)
continue;
} else if(packet_id_type == mmst->packet_id) {
packet_type = SC_PKT_ASF_MEDIA;
} else {
av_dlog(NULL, "packet id type %d is old.", packet_id_type);
continue;
}
}
if(packet_type == SC_PKT_KEEPALIVE) {
send_keepalive_packet(mmst);
continue;
} else if(packet_type == SC_PKT_STREAM_CHANGING) {
handle_packet_stream_changing_type(mmst);
} else if(packet_type == SC_PKT_ASF_MEDIA) {
pad_media_packet(mms);
}
return packet_type;
}
}
| 1threat
|
static void gen_compute_branch1 (CPUState *env, DisasContext *ctx, uint32_t op,
int32_t cc, int32_t offset)
{
target_ulong btarget;
const char *opn = "cp1 cond branch";
TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
TCGv t1 = tcg_temp_local_new(TCG_TYPE_TL);
if (cc != 0)
check_insn(env, ctx, ISA_MIPS4 | ISA_MIPS32);
btarget = ctx->pc + 4 + offset;
switch (op) {
case OPC_BC1F:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_not_tl(t0, t0);
tcg_gen_movi_tl(t1, 0x1 << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1f";
goto not_likely;
case OPC_BC1FL:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_not_tl(t0, t0);
tcg_gen_movi_tl(t1, 0x1 << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1fl";
goto likely;
case OPC_BC1T:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_movi_tl(t1, 0x1 << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1t";
goto not_likely;
case OPC_BC1TL:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_movi_tl(t1, 0x1 << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1tl";
likely:
ctx->hflags |= MIPS_HFLAG_BL;
tcg_gen_trunc_tl_i32(bcond, t0);
break;
case OPC_BC1FANY2:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_not_tl(t0, t0);
tcg_gen_movi_tl(t1, 0x3 << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1any2f";
goto not_likely;
case OPC_BC1TANY2:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_movi_tl(t1, 0x3 << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1any2t";
goto not_likely;
case OPC_BC1FANY4:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_not_tl(t0, t0);
tcg_gen_movi_tl(t1, 0xf << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1any4f";
goto not_likely;
case OPC_BC1TANY4:
{
int l1 = gen_new_label();
int l2 = gen_new_label();
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I32);
get_fp_cond(r_tmp1);
tcg_gen_ext_i32_tl(t0, r_tmp1);
tcg_temp_free(r_tmp1);
tcg_gen_movi_tl(t1, 0xf << cc);
tcg_gen_and_tl(t0, t0, t1);
tcg_gen_brcondi_tl(TCG_COND_NE, t0, 0, l1);
tcg_gen_movi_tl(t0, 0);
tcg_gen_br(l2);
gen_set_label(l1);
tcg_gen_movi_tl(t0, 1);
gen_set_label(l2);
}
opn = "bc1any4t";
not_likely:
ctx->hflags |= MIPS_HFLAG_BC;
tcg_gen_trunc_tl_i32(bcond, t0);
break;
default:
MIPS_INVAL(opn);
generate_exception (ctx, EXCP_RI);
goto out;
}
MIPS_DEBUG("%s: cond %02x target " TARGET_FMT_lx, opn,
ctx->hflags, btarget);
ctx->btarget = btarget;
out:
tcg_temp_free(t0);
tcg_temp_free(t1);
}
| 1threat
|
Does installing .NET Framework 4.7 eliminate the need to install 4.6.x? : <p>Our environments currently have </p>
<pre><code>.NET Framework 2.0 50727
.NET Framework 3.0 30729
.NET Framework 3.5 30729
.NET Framework 4.5.2 379893
</code></pre>
<p>Rolling out 4.7 this week. Will an application targeting 4.6.x use 4.7, or do I need to install 4.6 also?</p>
| 0debug
|
static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
int64_t *ppos, int64_t pos_limit)
{
RMDemuxContext *rm = s->priv_data;
int64_t pos, dts;
int stream_index2, flags, len, h;
pos = *ppos;
if(rm->old_format)
return AV_NOPTS_VALUE;
avio_seek(s->pb, pos, SEEK_SET);
rm->remaining_len=0;
for(;;){
int seq=1;
AVStream *st;
len=sync(s, &dts, &flags, &stream_index2, &pos);
if(len<0)
return AV_NOPTS_VALUE;
st = s->streams[stream_index2];
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
h= avio_r8(s->pb); len--;
if(!(h & 0x40)){
seq = avio_r8(s->pb); len--;
}
}
if((flags&2) && (seq&0x7F) == 1){
av_add_index_entry(st, pos, dts, 0, 0, AVINDEX_KEYFRAME);
if(stream_index2 == stream_index)
break;
}
avio_skip(s->pb, len);
}
*ppos = pos;
return dts;
}
| 1threat
|
static int vapic_enable(VAPICROMState *s, CPUX86State *env)
{
int cpu_number = get_kpcr_number(env);
target_phys_addr_t vapic_paddr;
static const uint8_t enabled = 1;
if (cpu_number < 0) {
return -1;
}
vapic_paddr = s->vapic_paddr +
(((target_phys_addr_t)cpu_number) << VAPIC_CPU_SHIFT);
cpu_physical_memory_rw(vapic_paddr + offsetof(VAPICState, enabled),
(void *)&enabled, sizeof(enabled), 1);
apic_enable_vapic(env->apic_state, vapic_paddr);
s->state = VAPIC_ACTIVE;
return 0;
}
| 1threat
|
Reset coupon code when user leave chekout page : There is a question. There is a website on WordPress + Woocommerce.
There is a checkout page site.com/checkout.
On this page you can enter a promo code and get a discount on the product. Is it possible to do next? When user leave checkout page and go to page for example site.com/shop, site.com/cart - coupon will be reset?
| 0debug
|
static void liveness_pass_1(TCGContext *s)
{
int nb_globals = s->nb_globals;
int oi, oi_prev;
tcg_la_func_end(s);
for (oi = s->gen_op_buf[0].prev; oi != 0; oi = oi_prev) {
int i, nb_iargs, nb_oargs;
TCGOpcode opc_new, opc_new2;
bool have_opc_new2;
TCGLifeData arg_life = 0;
TCGTemp *arg_ts;
TCGOp * const op = &s->gen_op_buf[oi];
TCGOpcode opc = op->opc;
const TCGOpDef *def = &tcg_op_defs[opc];
oi_prev = op->prev;
switch (opc) {
case INDEX_op_call:
{
int call_flags;
nb_oargs = op->callo;
nb_iargs = op->calli;
call_flags = op->args[nb_oargs + nb_iargs + 1];
if (call_flags & TCG_CALL_NO_SIDE_EFFECTS) {
for (i = 0; i < nb_oargs; i++) {
arg_ts = arg_temp(op->args[i]);
if (arg_ts->state != TS_DEAD) {
goto do_not_remove_call;
}
}
goto do_remove;
} else {
do_not_remove_call:
for (i = 0; i < nb_oargs; i++) {
arg_ts = arg_temp(op->args[i]);
if (arg_ts->state & TS_DEAD) {
arg_life |= DEAD_ARG << i;
}
if (arg_ts->state & TS_MEM) {
arg_life |= SYNC_ARG << i;
}
arg_ts->state = TS_DEAD;
}
if (!(call_flags & (TCG_CALL_NO_WRITE_GLOBALS |
TCG_CALL_NO_READ_GLOBALS))) {
for (i = 0; i < nb_globals; i++) {
s->temps[i].state = TS_DEAD | TS_MEM;
}
} else if (!(call_flags & TCG_CALL_NO_READ_GLOBALS)) {
for (i = 0; i < nb_globals; i++) {
s->temps[i].state |= TS_MEM;
}
}
for (i = nb_oargs; i < nb_iargs + nb_oargs; i++) {
arg_ts = arg_temp(op->args[i]);
if (arg_ts && arg_ts->state & TS_DEAD) {
arg_life |= DEAD_ARG << i;
}
}
for (i = nb_oargs; i < nb_iargs + nb_oargs; i++) {
arg_ts = arg_temp(op->args[i]);
if (arg_ts) {
arg_ts->state &= ~TS_DEAD;
}
}
}
}
break;
case INDEX_op_insn_start:
break;
case INDEX_op_discard:
arg_temp(op->args[0])->state = TS_DEAD;
break;
case INDEX_op_add2_i32:
opc_new = INDEX_op_add_i32;
goto do_addsub2;
case INDEX_op_sub2_i32:
opc_new = INDEX_op_sub_i32;
goto do_addsub2;
case INDEX_op_add2_i64:
opc_new = INDEX_op_add_i64;
goto do_addsub2;
case INDEX_op_sub2_i64:
opc_new = INDEX_op_sub_i64;
do_addsub2:
nb_iargs = 4;
nb_oargs = 2;
if (arg_temp(op->args[1])->state == TS_DEAD) {
if (arg_temp(op->args[0])->state == TS_DEAD) {
goto do_remove;
}
op->opc = opc = opc_new;
op->args[1] = op->args[2];
op->args[2] = op->args[4];
nb_iargs = 2;
nb_oargs = 1;
}
goto do_not_remove;
case INDEX_op_mulu2_i32:
opc_new = INDEX_op_mul_i32;
opc_new2 = INDEX_op_muluh_i32;
have_opc_new2 = TCG_TARGET_HAS_muluh_i32;
goto do_mul2;
case INDEX_op_muls2_i32:
opc_new = INDEX_op_mul_i32;
opc_new2 = INDEX_op_mulsh_i32;
have_opc_new2 = TCG_TARGET_HAS_mulsh_i32;
goto do_mul2;
case INDEX_op_mulu2_i64:
opc_new = INDEX_op_mul_i64;
opc_new2 = INDEX_op_muluh_i64;
have_opc_new2 = TCG_TARGET_HAS_muluh_i64;
goto do_mul2;
case INDEX_op_muls2_i64:
opc_new = INDEX_op_mul_i64;
opc_new2 = INDEX_op_mulsh_i64;
have_opc_new2 = TCG_TARGET_HAS_mulsh_i64;
goto do_mul2;
do_mul2:
nb_iargs = 2;
nb_oargs = 2;
if (arg_temp(op->args[1])->state == TS_DEAD) {
if (arg_temp(op->args[0])->state == TS_DEAD) {
goto do_remove;
}
op->opc = opc = opc_new;
op->args[1] = op->args[2];
op->args[2] = op->args[3];
} else if (arg_temp(op->args[0])->state == TS_DEAD && have_opc_new2) {
op->opc = opc = opc_new2;
op->args[0] = op->args[1];
op->args[1] = op->args[2];
op->args[2] = op->args[3];
} else {
goto do_not_remove;
}
nb_oargs = 1;
goto do_not_remove;
default:
nb_iargs = def->nb_iargs;
nb_oargs = def->nb_oargs;
if (!(def->flags & TCG_OPF_SIDE_EFFECTS) && nb_oargs != 0) {
for (i = 0; i < nb_oargs; i++) {
if (arg_temp(op->args[i])->state != TS_DEAD) {
goto do_not_remove;
}
}
do_remove:
tcg_op_remove(s, op);
} else {
do_not_remove:
for (i = 0; i < nb_oargs; i++) {
arg_ts = arg_temp(op->args[i]);
if (arg_ts->state & TS_DEAD) {
arg_life |= DEAD_ARG << i;
}
if (arg_ts->state & TS_MEM) {
arg_life |= SYNC_ARG << i;
}
arg_ts->state = TS_DEAD;
}
if (def->flags & TCG_OPF_BB_END) {
tcg_la_bb_end(s);
} else if (def->flags & TCG_OPF_SIDE_EFFECTS) {
for (i = 0; i < nb_globals; i++) {
s->temps[i].state |= TS_MEM;
}
}
for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
arg_ts = arg_temp(op->args[i]);
if (arg_ts->state & TS_DEAD) {
arg_life |= DEAD_ARG << i;
}
}
for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
arg_temp(op->args[i])->state &= ~TS_DEAD;
}
}
break;
}
op->life = arg_life;
}
}
| 1threat
|
Jest enzyme shallow unexpected token < : <p>I am trying to use enzyme for testing react components, but cant get started even with the most basic example.</p>
<pre><code>import React from 'react'
import { shallow,render,mount,configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16';
import {LoginPage} from '../../../app/components/login/LoginPage'
configure({ adapter: new Adapter() });
test('should say hello',() => {
const loginPage = shallow(<LoginPage />)
expect(loginPage.contains('Hello').toBe(true))
})
</code></pre>
<p>when running this, I get the following error:-</p>
<pre><code>Test suite failed to run
D:/code/github/metallica2/metallica/client/src/app/__tests__/components/login/LoginPage.test.js: Unexpected token (9
:30)
7 |
8 | test('should say hello',() => {
> 9 | const loginPage = shallow(<LoginPage />)
| ^
10 | expect(loginPage.contains('Hello').toBe(true))
11 | })
</code></pre>
<p>What am I doing wrong here ?</p>
<p>Thanks,</p>
<p>Amar</p>
| 0debug
|
Compteur de clic c# : I would like to make a clicks counter with a button, that's my code.
I want to make a click counter, with the help of a button, which at each click, would display in a text box a number (1 then 2 ...) Can you help me?
private vous btn_click(object sender, EventArgs e)
{
do
{
int i = 0;
label1.Text = i.ToString();
break;
}
while(i < 10);
{
i++;
}
| 0debug
|
How to fix this regex to capture everything between the braces {} : I have a text string as follows:
The {"house apple!" >> "apples?"} {"does" >> "do"} not fall {-"far"}from {+" this an "}tree{"," >> ": "}.
I want to extract all of the content that is between { and }.
I have tried the following:
/{.*}/
However, this captures all of the content starting from the first {. Even content that is not inside the braces.{}
What am I doing wrong?
| 0debug
|
I am suffering from owin start up issue : [enter image description here][1]
[1]: http://i.stack.imgur.com/XRU7M.png
Please anyone help me and Please find attachments for error file.
| 0debug
|
static int laio_do_submit(int fd, struct qemu_laiocb *laiocb, off_t offset,
int type)
{
LinuxAioState *s = laiocb->ctx;
struct iocb *iocbs = &laiocb->iocb;
QEMUIOVector *qiov = laiocb->qiov;
switch (type) {
case QEMU_AIO_WRITE:
io_prep_pwritev(iocbs, fd, qiov->iov, qiov->niov, offset);
break;
case QEMU_AIO_READ:
io_prep_preadv(iocbs, fd, qiov->iov, qiov->niov, offset);
break;
default:
fprintf(stderr, "%s: invalid AIO request type 0x%x.\n",
__func__, type);
return -EIO;
}
io_set_eventfd(&laiocb->iocb, event_notifier_get_fd(&s->e));
QSIMPLEQ_INSERT_TAIL(&s->io_q.pending, laiocb, next);
s->io_q.n++;
if (!s->io_q.blocked &&
(!s->io_q.plugged || s->io_q.n >= MAX_QUEUED_IO)) {
ioq_submit(s);
}
return 0;
}
| 1threat
|
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1)
| 0debug
|
how to solve this error Access denied for user ''@'localhost' to database 'kishan' in php : <pre><code><html>
<body>
<?php
$servername="localhost";
$username="STARK-PC";
$password="YES";
$dbname="kishan";
$conn=new mysqli("localhost","STARK-PC","YES","kishan");
</code></pre>
<p></p>
<p>my database not select so what i can do for select my database ?</p>
| 0debug
|
Notepad plus plus shortcut for reloading files : <p>Is there any keyboard shortcut for reloading files in n++ ?
How can i configure my own?</p>
<p>Steps to reproduce:</p>
<ul>
<li>right click and reload on header tab.</li>
</ul>
| 0debug
|
Use Linq instead of nested foreach loops to sum values : <p>I want to find the sum of values without using a nested foreach loop</p>
<p>How do I write this using Linq instead?</p>
<pre><code>decimal posVal = 0;
decimal negVal = 0;
foreach (var j in journal)
{
foreach (var t in j.trans)
{
foreach (var l in t.line)
{
if (l.val > 0)
posVal += l.val;
else
negVal += l.val;
}
}
}
</code></pre>
| 0debug
|
What do packed_to_unpacked blocks do in GNU RADIO? : <p>Could somebody give me an example(e.g. input->output) of what this block does? Explanation is also appreciated. </p>
| 0debug
|
def find_rotation_count(A):
(left, right) = (0, len(A) - 1)
while left <= right:
if A[left] <= A[right]:
return left
mid = (left + right) // 2
next = (mid + 1) % len(A)
prev = (mid - 1 + len(A)) % len(A)
if A[mid] <= A[next] and A[mid] <= A[prev]:
return mid
elif A[mid] <= A[right]:
right = mid - 1
elif A[mid] >= A[left]:
left = mid + 1
return -1
| 0debug
|
Accessing a property inside a function defined in a method in PHP : <p>I need to call a function inside a method. This function needs access to a private property. This code:</p>
<pre><code>class tc {
private $data=123;
public function test() {
function test2() {
echo $this->data;
}
test2();
}
}
$a=new tc();
$a->test();
</code></pre>
<p>returns the following error:</p>
<p><strong>Fatal error: Using $this when not in object context in ... on line ...</strong></p>
<p>Using PHP 5.6.38. How can I do this?</p>
| 0debug
|
def sum_of_alternates(test_tuple):
sum1 = 0
sum2 = 0
for idx, ele in enumerate(test_tuple):
if idx % 2:
sum1 += ele
else:
sum2 += ele
return ((sum1),(sum2))
| 0debug
|
Best way to get view models with entity framework : <p>Suppose I have a domain model like this:</p>
<pre><code>public class Book
{
public int ID { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public DateTime PublicationDate { get; set; }
public DateTime EntryDate { get; set; }
public string EnteredBy { get; set; }
}
</code></pre>
<p>But I want a view model to exclude some fields, like this:</p>
<pre><code>public class BookView
{
public int ID { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public DateTime PublicationDate { get; set; }
}
</code></pre>
<p>There's two ways to get view models from the database. First way is this:</p>
<pre><code>List<BookView> views = context.Books.Where(b=>b.Author=="Winston Churchill")
.Select(b=>new BookView() { ID=b.ID,Title=b.Title,Author=b.Author,PublicationDate=b.PublicationDate})
.ToList();
</code></pre>
<p>and the second way is this:</p>
<pre><code>var results = context.Books.Where(b => b.Author == "Winston Churchill");
List<BookView> views = new List<BookView>();
foreach(var b in results)
{
views.Add(new BookView() { ID = b.ID,Title = b.Title,Author = b.Author,PublicationDate = b.PublicationDate});
}
</code></pre>
<p>My question is does the difference matter at all for performance? The latter would allow more separation of layers--for example the <code>Book</code> model could just be in a separate <code>Data</code> assembly that doesn't reference the view models at all. But, I wonder if the <code>Select</code> clause makes the query more efficient.</p>
| 0debug
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.