problem
stringlengths
26
131k
labels
class label
2 classes
void s390x_tod_timer(void *opaque) { S390CPU *cpu = opaque; CPUS390XState *env = &cpu->env; env->pending_int |= INTERRUPT_TOD; cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); }
1threat
Can I rely to ISE Eiffel as a programming language to offer web services through a DB connection : <p>I'm actually working for a little company of 10 people on the area of solar panels solutions in Chile. Am working on linux since 20 years now. When I studied programing I studied a lot with Eiffel which I found really ...
0debug
Logging from ASP.NET 5 application hosted as Azure Web App : <p>I have an ASP.NET 5 Web API that I host in Azure as a Web App. I want to log messages from my code using Azure Diagnostics. There are multiple article including <a href="https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot...
0debug
addition of elements within an array in python while loop : I have a numpy array full of numbers which I want to add to each other. For example if the list is [2,3,4,5,6]. I want to add 3 to 2 (index 1 to 0) and the 4 to 3 (index 2 to 1) and so on. I've been stressing out trying to figure out a while statement whic...
0debug
how to solve the error_syntax error near '< ' : Msg 102, Level 15, State 1, Line 3 Incorrect syntax near '<'. I get the above error message everytime I try to execute the query below. Please help!! UPDATE [dbo].[FM1] SET [Datum] = <Datum, smalldatetime,> ,[Gesamtzeit] = <Gesamtzeit, nvarch...
0debug
Storing value in memory node js : <p>I use a request to return a value in node js. I would like to store the value return in memory in node js. Besides, the value should be initialize on app start. How could it be achieved?</p>
0debug
Can't figure out whats the cause of seg fault : <p>Total C noob here. Having difficulty location the cause of this seg fault. I have tried running a debugger the <code>GBD</code> debugger but I can't figure out how to get it working. The function I'm trying to test removes the contents of an array, puts it in a linked ...
0debug
Sort by JSON field values : <p>I have a table with json values like this:</p> <p><strong>-Table 1</strong></p> <pre><code>id | name | data ------+----------+--------------- 1 | Test | {"city_id": 3, "email":"test@test.com", "city_name":"something"} 2 | Test 2 | {"city_id": 1, "email":"test2@tes...
0debug
void usb_test_hotplug(const char *hcd_id, const int port, void (*port_check)(void)) { QDict *response; char *cmd; cmd = g_strdup_printf("{'execute': 'device_add'," " 'arguments': {" " 'driver': 'usb-tablet'," ...
1threat
static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev, uint32_t node, Error **errp) { Error *local_err = NULL; sPAPRMachineState *ms = SPAPR_MACHINE(hotplug_dev); PCDIMMDevice *dimm = PC_DIMM(dev); PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm)...
1threat
Palindrome check in python : <p>Hello to everyone on stack.</p> <p>I am trying to make a python program capable of searching for palindromes.</p> <p>If my inputs were simply words to evaluate, I would have had no problem writing the code </p> <pre><code>def ispalindrome(word): return word == word[::-1] </code></...
0debug
How to fetch second row from the CSV file using ruby : <p>The CSV file will be downloaded after clicking on the button present on the application and contains the same data as the table. Scenario-: I have to test the whether the data in the csv file contains the same data as the table contains on the application.</p>
0debug
Angular 2: NgFor without HTML Tag? : <p>i want to create a ngFor Loop without a div tag.</p> <p>Is this somehow possible? </p> <p>My Problem is, that when i use a div *ngFor the slider is broken.</p> <pre><code>&lt;ion-slides #secondSlider [options]="secondSlideOptions" (ionDidChange)="onSecondSlideChanged()"&gt; ...
0debug
Comparison of data types without using comparisons : <p>I would like to know how l can overload a function named void maximum to find the maximum of two integer or two double numbers. When passing one integer and one double number function it should print that double vs int or int vs double. And in this case comparison...
0debug
double av_int2dbl(int64_t v){ if(v+v > 0xFFEULL<<52) return NAN; return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075); }
1threat
How to find linecount in Perl? : <p>How do I find out linecount in perl similar to what wc -l gives me. A method preferably that doesn't require reading the whole file.</p>
0debug
Read in a certain line only? : <p>I'm making a program to read in a configuration file and I only want to read certain lines. Example:</p> <p>config.txt:</p> <pre><code>This is a test configuration text file It isn't supposed to read this line or the line above it Read this line, but not the white space above or bel...
0debug
static void target_setup_frame(int usig, struct target_sigaction *ka, target_siginfo_t *info, target_sigset_t *set, CPUARMState *env) { struct target_rt_sigframe *frame; abi_ulong frame_addr, return_addr; frame_addr = get_sigframe(ka, env...
1threat
What is Robust in java : <p>I know that <strong>Robust</strong> is a Feature of java programming language. But I don't know what is the exact meaning of it and how to any programmer benefited by it.</p>
0debug
Decode the string with the number of letter repeation : <p>I have a string "<strong>3A4B2GEF</strong>", need to decode it to "<strong>AAABBBBGGEF</strong>". If there is no number before letter, <strong>it means that repeat = 1</strong>. But in the output the maximum letters of string is 30, example "29A3B" output is:</...
0debug
static ssize_t nic_receive(NetClientState *nc, const uint8_t * buf, size_t size) { EEPRO100State *s = DO_UPCAST(NICState, nc, nc)->opaque; uint16_t rfd_status = 0xa000; #if defined(CONFIG_PAD_RECEIVED_FRAMES) uint8_t min_buf[60]; #endif static const uint8_t broadcast_macaddr[6] = ...
1threat
forms of same id in while loop - how to post formdata of user submitted form to php with jquery ajax : I have a while loop wich creates forms like: <?php $i = 1; while($i<10){ ?> <form id="update"> <tr> <th scope="row"><?php echo $i;?></th> <td></td> ...
0debug
Changing font size on javaScript : Im currently trying to change the FontSize of the Letters "Se Habla Espanol" So Im relative New to Javascript .... And well during the process of the me playing with the website i got into the following problem. This is what i currently have... <body> <fon...
0debug
bool qemu_clock_has_timers(QEMUClockType type) { return timerlist_has_timers( main_loop_tlg.tl[type]); }
1threat
static void sbr_dequant(SpectralBandReplication *sbr, int id_aac) { int k, e; int ch; if (id_aac == TYPE_CPE && sbr->bs_coupling) { float alpha = sbr->data[0].bs_amp_res ? 1.0f : 0.5f; float pan_offset = sbr->data[0].bs_amp_res ? 12.0f : 24.0f; for (e = 1; e <= sbr->d...
1threat
why only one filename is written in using ls > in shell script : I'm stacked in coding shell script in my RedHatOS. I tried to output filename using Regular expression as below。 #!/bin/bash ls -1r rrr* > /tmp/memo.txt and the result is this /tmp/memo.txt /tmp/rrr1.txt I want to desc...
0debug
static int load_refcount_block(BlockDriverState *bs, int64_t refcount_block_offset, void **refcount_block) { BDRVQcow2State *s = bs->opaque; int ret; BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_LOAD); ret = qcow2_cache_get(bs, s->refcount...
1threat
static void update_irq(struct HPETTimer *timer) { qemu_irq irq; int route; if (timer->tn <= 1 && hpet_in_legacy_mode()) { if (timer->tn == 0) { irq=timer->state->irqs[0]; } else irq=timer->state->irqs[8]; } else { route=timer_in...
1threat
DOS command to copy only files and not folders in a folder tree : Let's assume the following folder structure, c:\tab\file1.txt c:\tab\insidetab1\file2.txt c:\tab\insidetab2\file3.txt c:\tab\insidetab3\insidetab4\file4.txt I want to copy only files file1.txt,file2.txt,file3.txt,file4.txt to some destination. B...
0debug
void ff_check_pixfmt_descriptors(void){ int i, j; for (i=0; i<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); i++) { const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[i]; if (!d->name && !d->nb_components && !d->log2_chroma_w && !d->log2_chroma_h && !d->flags) continue; ...
1threat
void ff_put_h264_qpel16_mc00_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { copy_width16_msa(src, stride, dst, stride, 16); }
1threat
Apache camel conditional routing didn't work : I am trying to transfer file by using apache camel conditional routing. The condition is if filename starts with "041PACS".It created a .camel diretory on source folder.But don't know why file didn't transfered to destination folder.There is no error in console. I am usi...
0debug
Looking for a CMS with a Template and Content Element-System like Typo3 and Concrete5 : <p>Community!</p> <p>I know, these questions shouldn't be opinion-based and I'm certainly not asking "What's the best CMS???". I'm just at a point of having tried out so many different CMS that I want to know if there does exist on...
0debug
int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate) { MPADecodeContext s1, *s = &s1; s1.avctx = avctx; if (ff_mpa_check_header(head) != 0) return -1; if (ff_mpegaudio_decode_header(s, head) != 0) { return -1; } switch(s->layer) { c...
1threat
How can I remove a file from Git within IntelliJ VCS? : <p>VCS has an <code>Add</code> option (Git Add) but seems to lack Git Remove.</p> <p>What's the idiomatic way to Git Remove with VCS?</p>
0debug
Twitch API login authorization : I'm trying to make a login trough Twitch API, but I have a few problems with a code. The code was written by BarryCarlyon, and copied from this forum https://discuss.dev.twitch.tv/t/authorization-code-flow/5148/12 . I'm not that familiar with the Twitch API, and my PHP knowledge only...
0debug
void qdict_put_obj(QDict *qdict, const char *key, QObject *value) { unsigned int hash; QDictEntry *entry; hash = tdb_hash(key) % QDICT_HASH_SIZE; entry = qdict_find(qdict, key, hash); if (entry) { qobject_decref(entry->value); entry->value = value; } else { ...
1threat
Flatmapping in Java : Given the following two dimensional array int[][] arr = {{1, 2}, {3, 4}, {5, 6}}; What is the most elegant way in java to flatmap this to the following form int[] arr = {1, 3, 5, 2, 4, 6}; It can be assumed that all the nested arrays are of same length.
0debug
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
0debug
static inline void tcg_out_ext8u(TCGContext *s, int dest, int src) { assert(src < 4 || TCG_TARGET_REG_BITS == 64); tcg_out_modrm(s, OPC_MOVZBL + P_REXB_RM, dest, src); }
1threat
static void audio_reset_timer (AudioState *s) { if (audio_is_timer_needed ()) { timer_mod (s->ts, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + conf.period.ticks); } else { timer_del (s->ts); } }
1threat
How to variable in Object.keys : i'm trying to use use Object.keys in a map function but i'm getting keys based on map value variable but it's giving me error [my data object][1] as you can see i'm trying to get the keys of Display and coin value from map variable and the coin value is in the array at the end but it's ...
0debug
What are atomic operations for newbies? : <p>I am a newbie to operating systems and every answer I've found on Stackoverflow is so complicated that I am unable to understand. Can someone provide an explanation for what is an </p> <blockquote> <p>atomic operation</p> </blockquote> <p>For a newbie?</p> <p><strong>My...
0debug
Is there a way to use --esModuleInterop in tsconfig as opposed to it being a flag? : <p>Typescript v 2.7 released really neat flag called <code>--esModuleInterop</code> <a href="https://www.typescriptlang.org/docs/handbook/compiler-options.html" rel="noreferrer">https://www.typescriptlang.org/docs/handbook/compiler-opt...
0debug
Override .dockerignore file when using ADD : <p>I have one Rockerfile that builds 4 images; I also have one central <code>.dockerignore</code> file. For one of the images I require assets that are blocked by the <code>.dockerignore</code> file -- is there a way when doing <code>ADD</code> or <code>COPY</code> to force ...
0debug
How to convert a string (describing arrays) into an array in python : <p>I have this string:</p> <pre><code>'[[57.7322273254, -58.8288497925, -54.460193634, 28.4842605591, -45.9620323181, -13.6266260147, -17.2981243134, -15.1332969666, -15.1287126541, -2.44765377045, -0.488036692142, -9.05566310883, -4.70651531219], [...
0debug
static inline int decode_hrd_parameters(H264Context *h, SPS *sps) { int cpb_count, i; cpb_count = get_ue_golomb_31(&h->gb) + 1; if (cpb_count > 32U) { av_log(h->avctx, AV_LOG_ERROR, "cpb_count %d invalid\n", cpb_count); return AVERROR_INVALIDDATA; } get_bits(&h->gb, 4); ...
1threat
How to convert timestamp from a String in Swift 3? : consider the string like "2017-08-30T06:40:00.000+00:00" 1 - How to convert this string into timestamp 2 - How to group this input into time slots (for eg, if the input is time = 2:30 PM, it will be grouped into the slot of 2pm to 3pm)
0debug
How to reset keys after unsetting values in an array? : <p>Take the following array:</p> <pre><code>$fruits = [ 'apple', 'banana', 'grapefruit', 'orange', 'melon' ]; </code></pre> <p>Grapefruits are just disgusting, so I would like to unset it.</p> <pre><code>$key = array_search('grapefruit', $fruit); unset($fru...
0debug
static int img_amend(int argc, char **argv) { Error *err = NULL; int c, ret = 0; char *options = NULL; QemuOptsList *create_opts = NULL; QemuOpts *opts = NULL; const char *fmt = NULL, *filename, *cache; int flags; bool quiet = false, progress = false; BlockBackend *blk = NU...
1threat
static void gen_addc(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb) { TCGv t0 = tcg_const_tl(0); TCGv res = tcg_temp_new(); TCGv sr_cy = tcg_temp_new(); TCGv sr_ov = tcg_temp_new(); tcg_gen_shri_tl(sr_cy, cpu_sr, ctz32(SR_CY)); tcg_gen_andi_tl(sr_cy, sr_cy, 1); tcg_gen_add2_t...
1threat
What is difference between "git push" and "a pull request"? : <p>I already figured out the following part of workflow of git: you do git add and then git commit and then git push. The git push step basically publish your changes to the github. So what is this next step commonly referred to as "pull request"? Suppose th...
0debug
Code to reverse a string: "Undefined symbols for architecture x86_64" : <p>I'm writing a function to reverse a string, but I keep on getting the error "Undefined symbols for architecture x86_64" when compiling (clang). Here is my code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; using namespace s...
0debug
Sorting array with "linear" order : I need to sort an array in "linear" order like this example: var a = [510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 402, 402, 510, 510, 510, 510, 64, 510, 73, 510, 510, 510, 73, 510, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 7...
0debug
static void rom_reset(void *unused) { Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (rom->data == NULL) continue; cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize); if (rom->isrom) { ...
1threat
Change td cell colour based on a number typed into an input field : <p>I have a form. In the form I have number input fields. The minimum number is 1 and the maximum is 5. All good so far. The use puts in a number (between 1-5) based on a risk assessment. 1 being low risk and 5 being high risk. If the user puts in...
0debug
static void RENAME(resample_one)(DELEM *dst, const DELEM *src, int dst_size, int64_t index2, int64_t incr) { int dst_index; for (dst_index = 0; dst_index < dst_size; dst_index++) { dst[dst_index] = src[index2 >> 32]; index2 += incr; } }
1threat
static struct mm_struct *vma_init(void) { struct mm_struct *mm; if ((mm = qemu_malloc(sizeof (*mm))) == NULL) return (NULL); mm->mm_count = 0; TAILQ_INIT(&mm->mm_mmap); return (mm); }
1threat
MSSQL Simple query to include all columns based upon the MAX of one. I feel dumb : I've read through a lot of other articles and at this point I think I'm just beating my head against a wall. If any of you could explain how I would replace this statement SELECT * FROM EmployeeInformation I want to see all columns...
0debug
Looping through certain files in a folder and running command on them while and also change the file name : <p>beginner here. I want to write a simple script for use in the bash terminal, but I don't know how to make it. The gist is that I have a folder filled with different files, some .foo, some .bar, etc. I want to ...
0debug
Select rows with duplicate values on 1 column SQL : Using SQL Server, I have : DATE Cookie ======================= 1 10/04/2018 123 2 10/05/2018 123 3 10/06/2018 321 4 10/07/2018 123 What i want : DATE Cookie ======================= ...
0debug
static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table, const char *language, kbd_layout_t *k) { FILE *f; char * filename; char line[1024]; int len; filename = qemu_find_file(QEMU_FILE_TYPE...
1threat
Calculating leap years : <p>I have an assignment that is supposed to calculate whether a year that the user inputs is in fact a leap year. I cannot figure out the formula for this. Can anyone help? I can figure out the rest of the code but here is what is needed:</p> <p><strong>The month of February normally has 28 da...
0debug
How does Lombok.val actually work? : <p><a href="https://projectlombok.org/features/val.html" rel="noreferrer">Lombok.val</a> allows you to </p> <blockquote> <p>use val as the type of a local variable declaration instead of actually writing the type. When you do this, the type will be inferred from the initializer...
0debug
Flutter layout without AppBar : <p>I need a layout without an appbar, so the most obvious approach is to just leave out the <code>appbar</code> tag on the <code>Scaffold</code> but if I do that the content goes underneath the status bar like this:</p> <p><a href="https://i.stack.imgur.com/j1AzG.png" rel="noreferrer"><...
0debug
Multiprocessing : use tqdm to display a progress bar : <p>To make my code more "pythonic" and faster, I use "multiprocessing" and a map function to send it a) the function and b) the range of iterations.</p> <p>The implanted solution (i.e., call tqdm directly on the range tqdm.tqdm(range(0, 30)) does not work with mul...
0debug
ESLint --fix not editing files : <p>I am trying to lint and fix my code using ESLint. When I run ESLint with my config file and without the fix flag, it runs fine, and this is what it outputs. </p> <p>eslint-c .eslintrc.json ./src/aura/SearchAvailableNumbers</p> <pre><code>/home/jason/sfa/testproj/src/aura/SearchAv...
0debug
Android Change Button text randomly : <p>How to change button text every 5 secs ? i,e First the text will be "hello" and after 5 secs it should be "Hi" and then "hello" and then "hi" and so on until I click that button.</p>
0debug
Changing a variable outside of a for loop : <p>I am writing a program where I am accessing an object in a list using a for loop. I want to be able to change a variable outside of a for loop from within the loop. Code snippet below:</p> <pre><code>member_found = False # default value for member in self._members: ...
0debug
int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant, int quant_offset) { MpegEncContext *const s = w->s; int mb_xy; assert(s); w->use_quant_matrix = get_bits1(&s->gb); w->dquant = dquant; w->quant = dquant >> 1; w->qsum = quant_offset...
1threat
In Python 3 Regexes, does dot-star (.*) match spaces? : Sorry this is a simple question but I couldn't find an answer anywhere. I'm going through Automate the Boring Stuff and I'm on Chapter 7 which is about Regexes. It says .* matches any character except a newline, does that include a space? Thanks in advanc...
0debug
Video Conferencing in Freeswitch : <p>I am working on Calling Solution which uses FreeSwitch for Audio/Video Calling. I am stuck with Video Conferencing system that will be run by iOS and Andriod client devices.</p> <ul> <li>When I create a Video Conference Call, every user can see Video of only one user.</li> <li>The...
0debug
Is it possible to apply css to only overflow:hidden elements? : Here i want to apply visibility:hidden only to those divs which are not visible <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> <!DOCTYPE html> <html> <head> <script src="https://aj...
0debug
Angular-universal getting error: You must pass in a NgModule or NgModuleFactory to be bootstrapped : <p>I converted my existing angular-cli application to angular-universal by following <a href="https://github.com/angular/angular-cli/wiki/stories-universal-rendering" rel="noreferrer">this guide</a>.</p> <p>You can loo...
0debug
Automatic Logout Using Php : <p>If user 'A' is logged in some credentials into a Mobile App.for ex, username: user password: user and user 'B' tries to login using same credentials provided above.Then on successful login of user 'B',user 'A' session must be destroyed and should be automatically logged out from the Mobi...
0debug
Python functions in general : <p><a href="https://i.stack.imgur.com/WGYfR.png" rel="nofollow noreferrer">How do I fix this error?! I'm not sure what to change about it. I tried to remove using float but its not working? </a></p>
0debug
How to get the indices list of all NaN value in numpy array? : <p>Say now I have a numpy array which is defined as,</p> <pre><code>[[1,2,3,4], [2,3,NaN,5], [NaN,5,2,3]] </code></pre> <p>Now I want to have a list that contains all the indices of the missing values, which is <code>[(1,2),(2,0)]</code> at this case.</p>...
0debug
int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, TAKStreamInfo *ti, int log_level_offset) { if (get_bits(gb, TAK_FRAME_HEADER_SYNC_ID_BITS) != TAK_FRAME_HEADER_SYNC_ID) { av_log(avctx, AV_LOG_ERROR + log_level_offset, "missing sync id\n"); ...
1threat
SELECT ID THAT HAVE MULTIPLES ATTRIBUTS AND VALUES : i have table1 : +------+---------+ | id | name | +------+---------+ | 1 | name1 | | 2 | name2 | | 3 | name3 | | 4 | name4 | +------+---------+ i have table2 : +------+---------+----------+ | id | attribut| value | +--...
0debug
Will the following code removes a relationship by setting the foreign key to 0? : I have a question about entity framework. Will the following code removes a relationship by setting the foreign key to 0? entity.relationEntityID = 0;
0debug
How to make a texbox numeric only or text only VB.net : Dear Stackoverflow people, It's my first time asking a question here, but i also try to help other people as good as possible. But now lets get to the question. I've a form with 3 textboxes and 2 buttons. Button 1 is enabled if all 3 textboxes are filled in. Bu...
0debug
How to minify ES6 code using Webpack? : <p>I'm using webpack and want to deploy my site. If I minify and bundle my JavaScript code, I've got this error:</p> <blockquote> <p><strong>Parse error:</strong> Unexpected token: name (<code>Button</code>)</p> </blockquote> <p>Here is my not bundled code:</p> <pre><code>'u...
0debug
int av_write_trailer(AVFormatContext *s) { int ret; while(s->packet_buffer){ int ret; AVPacketList *pktl= s->packet_buffer; truncate_ts(s->streams[pktl->pkt.stream_index], &pktl->pkt); ret= s->oformat->write_packet(s, &pktl->pkt); s->packet_buf...
1threat
static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base) { USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev); USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base); int rc; pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc); dev->info = info; dev->auto_a...
1threat
static const ppc_def_t *ppc_find_by_pvr (uint32_t pvr) { int i; for (i = 0; i < ARRAY_SIZE(ppc_defs); i++) { if (pvr == ppc_defs[i].pvr) { return &ppc_defs[i]; } } return NULL; }
1threat
document.write('<script src="evil.js"></script>');
1threat
import a function from another .ipynb file : <p>I defined a hello world function in a file called 'functions.ipynb'. Now, I would like to import functions in another file by using "import functions". I am sure that they are in the same folder. However, it still shows that "ImportError: No module named functions". By th...
0debug
quotation marks in bash script around $@? : <p>I found the following snippet of bash script from <a href="https://stackoverflow.com/questions/8818119/how-can-i-run-a-function-from-a-script-in-command-line">How can I run a function from a script in command line?</a></p> <pre><code>$ cat test.sh testA() { echo "TEST A...
0debug
bash - shuffle a file that is too large to fit in memory : <p>I've got a file that's too large to fit in memory. <code>shuf</code> seems to run in RAM, and <code>sort -R</code> doesn't shuffle (identical lines end up next to each other; I need all of the lines to be shuffled). Are there any options other than rolling m...
0debug
Store html content into php vaiable? : I have some html in my php page that I fetched from database and will be used many times in my webpage, so I want to put it into a php variable for later use. My sample code is <div class="info"> Some content from database here... <div class="more"> ...
0debug
git - error: addinfo_cache failed for path 'file' : <p>When I try to merge any branch in git into master I get <code>error: addinfo_cache failed for path 'file'</code>.</p> <p>What I do:</p> <pre><code>&gt;git checkout master &gt;git merge other-branch </code></pre> <p>Git gives me:</p> <pre><code>error: addinfo_ca...
0debug
its possible update a page content use html and css without javascript? : <p>its possible update a page content use html and css without javascript</p> <p>I see this tutorial but i dont know if is possible update page on click without javascript </p> <p><a href="http://codepen.io/ejsado/pen/EaFsy?css-preprocessor=sas...
0debug
How to verify React props in Jest and Enzyme? : <p>So I was trying to learn about testing in React and I have this: <code>Button.js</code> and <code>Button.test.js</code></p> <p>The question is commented along with the code below: </p> <pre class="lang-js prettyprint-override"><code>// Button.js import React from 're...
0debug
static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,long src_size) { uint8_t *dest = dst; const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*s):"memory"); mm_end = en...
1threat
static void dbdma_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { int channel = addr >> DBDMA_CHANNEL_SHIFT; DBDMAState *s = opaque; DBDMA_channel *ch = &s->channels[channel]; int reg = (addr - (channel << DBDMA_CHANNEL_SHIFT)) >> 2; DBD...
1threat
PHP int checking not working : <p>Well, I've tried making a rank system but it doesn't seem to work? I'm new but learning please take it easy on me. Here is where I check for users info</p> <p><strong>GetInfo.php</strong> <pre><code> # Check if user is valid session_start(); if(!isset($_SESSION['usern...
0debug
I don't understand why backslash is used in extends class in php code : <p>class SwiftMailerTestCase extends \PHPUnit_Framework_TestCase</p> <p>why coder uses backslash in extends class in above php code</p>
0debug
I'm Creat android layout but after running on my real device i'm getting unique view of same layout please help me as soon as possible : I have an main activity in which I have creating layout in XML in android studio and setting width and height properly as per my need but after executing my code on my device I'm gett...
0debug
static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; unsigned i, entries; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; avio_rb32(pb); entries = avio_rb32...
1threat
void *g_try_realloc(void *mem, size_t n_bytes) { __coverity_negative_sink__(n_bytes); return realloc(mem, n_bytes == 0 ? 1 : n_bytes); }
1threat