problem
stringlengths
26
131k
labels
class label
2 classes
How do I format my output as a 4-by-4 matrix? : <pre><code>class By { public static void main(String args[]) throws InterruptedException { String key = "Hello world";// plaintext byte[] x = key.getBytes(); StringBuilder sb = new StringBuilder(); for (int i = 0; i &lt; x.length; i++) { int b = (int) x[i]; sb.append(Inte...
0debug
Excel need to match and paste to an adjacent cell : <p>So the formula needs to look at column D IN SHEET 1, go over to sheet 2, if it finds a match in column A, then paste the coordinates in column B into sheet 1 column E.<a href="http://i.stack.imgur.com/rehLP.png" rel="nofollow">IMAGE</a></p>
0debug
PHP beginner - Can global variable be used by other page? : I try to to write in test1.php <?php $a = 5; $b = 7; ?> in test2.php <?php global $a, $b; echo $a + $b; ?> but result is 0. So Could it be used in other page? or should I use session ?
0debug
How are variables in Java called that are set once but never again and are not final? : <p>I have several variables I need to set only once but never again after starting the application, such as SCREEN_WIDTH, ARRAY_X_LENGTH, TIME_APP_STARTED etc.</p> <p>I do not declare these final because the software will decide wh...
0debug
static uint64_t msix_pba_mmio_read(void *opaque, target_phys_addr_t addr, unsigned size) { PCIDevice *dev = opaque; return pci_get_long(dev->msix_pba + addr); }
1threat
void scsi_req_cancel(SCSIRequest *req) { trace_scsi_req_cancel(req->dev->id, req->lun, req->tag); if (!req->enqueued) { return; } scsi_req_ref(req); scsi_req_dequeue(req); req->io_canceled = true; if (req->aiocb) { bdrv_aio_cancel(req->aiocb); } }
1threat
How to specify a Moment.js object annotation in Flow : <p>I'm currently learning Flow by applying it to an existing project and looking to annotate function parameters as a Moment.JS objects. </p> <p>Using <a href="https://github.com/flowtype/flow-typed/" rel="noreferrer">flow-typed</a> I was able to install a library...
0debug
How to mane an "in" statement inclusive-only in SQL : I have a subset of values that I want to evaluate against a row in SQL. Select count(*) cnt from table_name c where c.table_row in ('value 1','value 2', 'value 3') and other statements; This works fine as long as I only want to determine if "ta...
0debug
Design a System for faster retrieval and modification without burdening the Heap Memory : <p>I need to design a system where data is received via ServerSocket and the data should be readily available for retrieval and modification. Currently, all the data is stored in ConcurrentHashMap.</p> <p>Data will be refreshed w...
0debug
format value type float in (Programming Language C/C++) : <p>How show 00156,00</p> <pre><code>float number = 156; printf("%5.2f",number); </code></pre> <p>The output of the example above:</p> <p>Output: 156.00</p>
0debug
static inline int wnv1_get_code(WNV1Context *w, int base_value) { int v = get_vlc2(&w->gb, code_vlc.table, CODE_VLC_BITS, 1); if (v == 15) return ff_reverse[get_bits(&w->gb, 8 - w->shift)]; else return base_value + ((v - 7) << w->shift); }
1threat
int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) { int i, ret; int32_t config_len; uint32_t num; uint32_t features; BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(vde...
1threat
Write in a txt file in PYTHON with class name which varie (0 to N) : I have a class name myClass which contain some attributes (attribute0, attibute1...). I have create N myClass (myClass0, myClass1...). To write in a .txt file myClass0.attribute0: fichier = open("myFile.txt", "a") fichier.write("{}"....
0debug
batch file code to detect 32-bit vs 64-bit office not working : <p>I'm trying to put together a batch file that would select the appropriate bit version of executables when run by the user. I found this code on stackoverflow: <a href="https://stackoverflow.com/questions/35820375/batch-file-check-office-architecture-ver...
0debug
grouping the batch in sql server : have a scenario wherein I have Id|rank| date 1 | 7 |07/08/2015 1 | 7 |09/08/2015 1 | 8 |16/08/2015 1 | 8 |17/08/2015 1 | 7 |19/08/2015 1 | 7 |15/08/2015 2 | 7 |01/08/2015 2 | 7 |02/08/2015 2 | 8 |16/08/2015 2 | 8 |17/08/2015 2 | 7 |26/08/2015 2 | 7 |28/08...
0debug
static void eepro100_cu_command(EEPRO100State * s, uint8_t val) { eepro100_tx_t tx; uint32_t cb_address; switch (val) { case CU_NOP: break; case CU_START: if (get_cu_state(s) != cu_idle) { logout("CU state is %u, should be %u\n", get_c...
1threat
Developer name constraints in App Store : <p>I'm creating my developer account and I have to choose developer name now. I wonder if I can use any name that is availeable or should I use my own name and surname. The problem is that I dont have company with that name. Can google ban my account because I have same name as...
0debug
Fetching all the records between start date and date that has been provided by the user using php, mysql : I have a start date and end date that has been stored in the database . I want to fetch record from start date to end date using php Mysql how can i get the records between those dates
0debug
How to return multiple values in a function (Python)? : <p>So I'm new to coding and working my way through the Titanic data set from Kaggle. In the data frame there are columns labeled "Age" and "Sex." I want to make a new column that has 4 values that indicate for different things: 0: Male aged 16 or over 1: Female ag...
0debug
SQL Server: Auto Increment Decimal Column : I need to auto increment a decimal Column in SQL SERVER 2014
0debug
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
static void block_dirty_bitmap_add_abort(BlkActionState *common) { BlockDirtyBitmapAdd *action; BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState, common, common); action = common->action->u.block_dirty_bitmap_add; if (state->pr...
1threat
Java EE? -insert record into database only if it does not exist : I have a table in a database called MYUSER, I am trying to create a method that will check if the Myuser object I pass into it already exists as a row within the database, and then insert that object as a row if it does not exist. [I have very little ...
0debug
Add a dash between running numbers and comma between non-running numbers : I would like to replace a set of running and non running numbers with commas and hyphens where appropriate. Using STUFF & XML PATH I was able to accomplish some of what I want by getting something like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 15, 1...
0debug
Sql Devloper - Use concat with GROUP BY function for COUNTING (Error ORA-00904) : I am working on a mock database for a project and I have two tables: CUSTOMERS AND ORDERS Both tables look like this CUSTOMERS: custID, custLName, custFName, custAddress, custTown, custPostcode, custPhone, custEmail And ORDERS:...
0debug
static int qemu_reset_requested(void) { int r = reset_requested; reset_requested = 0; return r; }
1threat
static void intra_predict_mad_cow_dc_l00_8x8_msa(uint8_t *src, int32_t stride) { uint8_t lp_cnt; uint32_t src0 = 0; uint64_t out0, out1; for (lp_cnt = 0; lp_cnt < 4; lp_cnt++) { src0 += src[lp_cnt * stride - 1]; } src0 = (src0 + 2) >> 2; out0 = src0 * 0x0101010101010101;...
1threat
textview position by backgorund imageview : i have background imageview(green with 3 red circle) and 3 textview (A,B,C). how can i put textviews exactly on center of red circles that support multi screen devices , portrait/landscape ? [![enter image description here][1]][1] [1]: http://i.stack.imgur.com/mTaa...
0debug
fetching json object from json string : hii need some urgent help. i am new to andorid and i am developing app which has server side functionality. i am getting response in json format my response is shown as this image i knw how to parse json using vally but i dont know hot to pasrse using GSOn. previous code...
0debug
static uint32_t rtas_set_allocation_state(uint32_t idx, uint32_t state) { sPAPRDRConnector *drc = spapr_drc_by_index(idx); sPAPRDRConnectorClass *drck; if (!drc) { return RTAS_OUT_PARAM_ERROR; } drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); return drck->set_allocation_state(drc, ...
1threat
React.js How to render component inside component? : <p>I am stuck. I have several seperate components on seperate files. If I render them in main.jsx like following: </p> <pre><code>ReactDOM.render(&lt;LandingPageBox/&gt;, document.getElementById("page-landing")); ReactDOM.render(&lt;TopPlayerBox topPlayersData={to...
0debug
Spark RDD: add field from RDD to other RDD : I'm using Pyspark and have to use RDDs (not dataframes) to do the following: I have two RDDs, rdd1, containing more than 100 fields with names and rdd2, containing one field called "city". rdd1 and rdd2 have the same number of rows (same length). rdd1 is like: >Row(n...
0debug
kubectl YAML config file equivalent of "kubectl run ... -i --tty ..." : <p>I've been using "kubectl run" with assorted flags to run Jobs interactively, but have recently outgrown what I can do with those flags, and have graduated to using YAML config files to describe my jobs.</p> <p>However, I can't find an equivalen...
0debug
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
0debug
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0 : <p>I don't know what ist wrong, it can read it, but then it tells me Index 1 out of bounds for length 0. What does it mean?</p> <pre><code>public class Kreisberechnung3 { public static void main(String[] args) {...
0debug
Get Records count of specified date-range from database, if no record present for one of the date then return count as '0' C# : I want List (containing count and date) of record from database for specifies date-range if for some date, records are not available in database then that date should be in list with count ...
0debug
Crash Report for Flutter : <p>I am new to flutter. I developed one Wallpaper App using flutter and upload in playstore. Now i need to track crash report for that app. In Android have <a href="http://try.crashlytics.com/" rel="noreferrer">crashlytics</a> to all report crash and more fearure's. Is <a href="http://try.cra...
0debug
Make a Tuple from two dictionaries in python : suppose i have a dictionary a={1:2,2:3} and b={3:4,4:5} I want to make a tuple such that t=({1:2,2:3},{3:4,4:5}) please help!
0debug
Kotlin Property: "Type parameter of a property must be used in its receiver type" : <p>I have the following simple Kotlin extension functions:</p> <pre><code>// Get the views of ViewGroup inline val ViewGroup.views: List&lt;View&gt; get() = (0..childCount - 1).map { getChildAt(it) } // Get the views of ViewGroup ...
0debug
Need help powershell : Need help in sorting out a data from my output and then display 'ALL OK' or 'NOT OK'. Invoke-Command -ComputerName XXXXX,XXXX -ScriptBlock { hastatus -sum; VXPRINT -VPl } -credential XXXXX -- SYSTEM STATE -- System State Frozen A XXXXXXXXXXXXX ...
0debug
static void spapr_rtc_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); dc->realize = spapr_rtc_realize; dc->vmsd = &vmstate_spapr_rtc; spapr_rtas_register(RTAS_GET_TIME_OF_DAY, "get-time-of-day", rtas_get_time_of_day); spapr_rtas_regi...
1threat
breakpoint() using ipdb by default : <p>Is it possible that installing <em>ipdb</em> (or some other package written to do it explicitely) will result in <code>breakpoint()</code> running <em>ipdb</em> instead of <em>pdb</em> without binding <code>sys.breakpointhook()</code> to <em>ipdb</em>?</p> <p><a href="https://ww...
0debug
Flutter - Custom Font not displaying : <p>This is an excerpt of my pubspec.yaml file:</p> <pre><code>flutter: uses-material-design: true fonts: - family: Coiny fonts: - asset: fonts/Coiny-Regular.ttf </code></pre> <p>I am trying to use the font called "Coiny" from the Google Fonts page. I created a...
0debug
please assist me to add google ads on my websitei tried they arent showing : i wish to get a guide on how to add google ads on html of my website i tried they are not showing <!DOCTYPE html> <html> <head> <title>WEB DEVELOPMENT TUTORIAL</title> <link rel="stylesheet" type="text/css"...
0debug
void vnc_zlib_clear(VncState *vs) { if (vs->zlib_stream.opaque) { deflateEnd(&vs->zlib_stream); } buffer_free(&vs->zlib); }
1threat
compile c program on windows with assembleur code : hi i use dev cpp to compil the above code but a problem accure #include<stdio.h> int main(){ char s; __asm( "mov %ah, 1" "int 21h" "mov %ah,2" "mov %dl,%al" "int 21h" ); return 0; } ...
0debug
android Push notifications with Google Cloud Messaging Service : I am new in android development.I have to work on android GCM push notification. Am search lots of tutorials and videos but no one is helpful for me.I have to implement GCM in client project its urgent. Anyone help me to understand and how to work wi...
0debug
How can I write following vector to csv file in r : <p><a href="https://i.stack.imgur.com/Xf96Z.png" rel="nofollow noreferrer">"tst2" is a matrix. I have converted in vector as C(tst2). I would like to write this vector/matrix into csv file </a></p>
0debug
static int aasc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AascContext *s = avctx->priv_data; int compr, i, stride, ret; ...
1threat
List files recursively in Kotlin : <p>to list files in a directory with kotlin, i used list() and listFiles() functions:</p> <pre><code>File("/tmp").list().forEach { println(it) } File("/tmp").listFiles().forEach { println(it) } </code></pre> <p>but, how can i list files recursively?</p>
0debug
Can't install matplotlib on Mac (Python) : <p>I am French, I am a student in chemistry and I don't know much about Python. I need to install matplotlib on my Mac for my program to work fine, but I tried and it didn't work... Can you help me ? Thank you very much </p> <p><a href="https://i.stack.imgur.com/3MdLq.png" re...
0debug
static int flic_decode_frame_24BPP(AVCodecContext *avctx, void *data, int *got_frame, const uint8_t *buf, int buf_size) { FlicDecodeContext *s = avctx->priv_data; GetByteContext g2; int pixel_ptr; unsigned char palette_idx1; ...
1threat
Creating a class library in visual studio code : <p>It might be a silly question, Let's say I don't have a Windows OS, have a Linux. I have created a .Net core console app, also want to create a class library and reference it in console app. I can't find if i am able to do it also couldn't find a sample on Microsoft .N...
0debug
Whats going wrong in the attached image? : I'm not able to set the below array of objects to the User class in TypeScript. let user: User[] = [{name: 'Naveen', address: [{'city': 'Bangalore'}]}]; ```class User { private name: string; private address: Address[]; constructor(name: string, address: Add...
0debug
Java: Order List of objects by values : <p>Hey everybody I have object which stores multiple integer values. I want it to sort it multiple times by descending order, one time descending by "Wins" value, another time descending by "Played" value etc... How can I do that ?</p>
0debug
is it possible to program in c language to search something in google and show the first search result as output? : <p>i am curious to know is it possible to write program in c language to search something in google and show the first search result as output accessing network? Is yes please tell me how with some codes....
0debug
how to convert a string to an integer in java : <p>i get an error when try to convert a string to an integer</p> <pre><code> public static void main(String[] args){ String rate= "3.7"; int age=20; boolean istrue=true; double salary=60.4; //convert to String String Newsalary=String.valueOf(salary); Stri...
0debug
Alpine Dockerfile Advantages of --no-cache Vs. rm /var/cache/apk/* : <p>When creating Dockerfiles using the Alpine image, I have often seen the use of the <code>apk --no-cache</code> and other times it is committed and instead I see <code>rm /var/cache/apk/*</code>.</p> <p>I am curious to know making use of the <code>...
0debug
Impact of matrix sparsity on cblas_gemm and cublasSgemm : I have recently discovered that the performance of a cblas_sgemm call for matrix multiplication dramatically improves if the matrices have a "large" number of zeros in them. It improves to the point that it beats its cublas cousin by more than a 100 times. This ...
0debug
from collections import Counter def count_Occurrence(tup, lst): count = 0 for item in tup: if item in lst: count+= 1 return count
0debug
Scheduling in a webpage release : <p>I have just started to learn html and css and curious to know if there's a way of scheduling changes to html code.</p> <p>To give you guys an idea of what I am looking to do...</p> <p>I am building a one page website that displays a quote or comment. I want this to change every da...
0debug
Refresh Header after Login in Angular2 : <p>So I have a header component that displays either the User's name or "Sign In" depending on whether they are logged in or not. I also have a Login component that does all of the business logic of logging in. They currently do not have a parent / child relationship.</p> <p>...
0debug
Why compilation error is giving in this java code? : <p>I was trying to compile the code and it shows a compilation error. Can anyone help me out to understand what is wrong in the code? I guess there should be a default constructor inside Mammal class but why?</p> <pre><code>class Mammal { public Mammal(int age) { ...
0debug
static inline void gen_intermediate_code_internal(X86CPU *cpu, TranslationBlock *tb, bool search_pc) { CPUState *cs = CPU(cpu); CPUX86State *env = &cpu->env; DisasContext dc1, *dc = &dc1; target_ul...
1threat
Trying to run a C program on unix but a little confused with how input file is handled : I've tried to search for this but I'm having trouble figuring how to phrase my question so I figured I'd just ask here. So I'm trying to run a C program in a unix environment and I have an input file as well. The teacher said we...
0debug
Fortran error in geany : i am trying to run the sub routine in geany, bur it keeps me giving the following warning NPJ(I,J) = DBLE(((2)/((X(I+1))-(X(I-1))))*DBLE(-((1)/(X(I+1)-X(I)))-((1)/(X(I)- X(I-1)))))+ & 1 Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1) ...
0debug
Can't write number with FileWriter : <p>This is my code and I want b[i] will be write to the file name test.txt but it is not working. It's just write something like symbols. Thanks for helping.</p> <pre><code>public class btl { public static boolean IsPrime(int n) { if (n &lt; 2) { return false; } ...
0debug
How can I protect a extarcted embedded resource? : <p>So I am working on a project where I need to build a login application that grants access to a embedded executable resource. I've been searching and didn't found a way to do that. From what a gatter, I cannot just execute without extracting it. So there must be a wa...
0debug
int text_console_init(QemuOpts *opts, CharDriverState **_chr) { CharDriverState *chr; TextConsole *s; unsigned width; unsigned height; chr = g_malloc0(sizeof(CharDriverState)); if (n_text_consoles == 128) { fprintf(stderr, "Too many text consoles\n"); exit(1); }...
1threat
How to calculate the energy of the function tri(2t+5/6) using matlab? : <p>How to calculate the energy of the function tri(2t+5/6) using matlab?[where tri is triangular pulse function]</p>
0debug
Select an element place after a element with Jquery : I have this HTML code: <input type="password" name="USR_NewPassword" class="form-control" maxlength="50" required> <span class="input-group-addon"> <a href=""><i class="fa fa-eye"></i></a> </span> Why this isn't working if I would like t...
0debug
NameError: name '*' is not defined : <p>Why this line <code>add(root, sum, 0)</code> gets <code>NameError: name 'add' is not defined</code> error?</p> <pre><code>class Solution: def rob(root: TreeNode) -&gt; int: sum = [0, 0] add(root, sum, 0) if sum[0] &lt; sum[1]: return sum[1...
0debug
static void event_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->bus_type = TYPE_SCLP_EVENTS_BUS; dc->unplug = qdev_simple_unplug_cb; dc->init = event_qdev_init; dc->exit = event_qdev_exit; }
1threat
My while loop conditions aren't evaluating them as I'm expecting : <p>I'm trying to make an input validation function that checks to see if cin fails (this works fine) and I'm trying to also make it check to see if it's within the min max range that I pass by variable to the function. </p> <p>I've already tried messin...
0debug
How to get ComputeIfPresent working with Map within Map? : <p>When trying to alter a Map using the <strong>computeIfPresent()</strong> method I have trouble implementing this method when I use an innerMap. </p> <p><strong>This works:</strong></p> <pre><code>Map&lt;String, Integer&gt; mapOne = new HashMap&lt;&gt;(); m...
0debug
TemplateNotFound error when running simple Airflow BashOperator : <p>I'm trying to write our first Airflow DAG, and I'm getting the following error when I try to list the tasks using command <code>airflow list_tasks orderwarehouse</code>:</p> <pre><code>Traceback (most recent call last): File "/usr/local/lib/python2...
0debug
const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model) { ObjectClass *oc; CPUClass *cc; Error *err = NULL; gchar **model_pieces; const char *cpu_type; model_pieces = g_strsplit(cpu_model, ",", 2); oc = cpu_class_by_name(typename, model_pieces[0]); if (o...
1threat
Is it safe to delete /root/sent in ubuntu? : <p>I have a server running ubuntu 14.04 What is inside of /root/sent? It is currently taking of 34GB of my server space. It is safe to delete it? </p>
0debug
How to call another classes super class? : <p>Lets say I have three classes, A,B,C. B inherits A, is there a way to access the getVal method of Class A, in C? </p> <pre><code> class A { getVal method } class B extends A { } Class C { main() { B x = new B x.getVal? } </code...
0debug
static void mpegts_push_data(void *opaque, const uint8_t *buf, int buf_size, int is_start) { PESContext *pes = opaque; MpegTSContext *ts = pes->stream->priv_data; AVStream *st; const uint8_t *p; int len, code, codec_type, codec_id; if (is_start) { ...
1threat
Why does -Xrs reduce performance : <p>From IBM:</p> <blockquote> <p><strong>-Xrs</strong></p> <p>Disables signal handling in the JVM.</p> <p><strong>-Xrs</strong></p> <p>Setting -Xrs prevents the Java™ run time environment from handling any internally or externally generated signals such as SIGSEGV an...
0debug
unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) { const unsigned long *p = addr + BITOP_WORD(offset); unsigned long result = offset & ~(BITS_PER_LONG-1); unsigned long tmp; if (offset >= size) { return size; } size -= res...
1threat
Connection to SQL Workbench/J gets disconnected frequently : <p>The connection to SQL Workbench/J gets disconnected very frequently. Where can I change the settings so that it does not lose the connections for atleast an hour.</p> <p>Thanks</p>
0debug
Does not return result - PHP/JavaScript : I am trying to make a table where in the result site returns a value but for now nothing appears. I really appreciate your help. <tr> <th>Objetivo 1</th> <th> <div class="input-field col s12"> <input id="DataInicio" type = "date" class = "...
0debug
Calling function with different arguments produces the same output. (C) : <p>I'm trying to make a program to generate 2 random numbers and print them to the screen. This is achieved by calling the Numbers function twice and assigning the value to num1 and num2 then calling PrintMsg twice also with those variables but i...
0debug
Customize the d3 month or year tick format : <p>So I made a chart in d3 and used the default x axis format,</p> <pre><code>d3.axisBottom(x) </code></pre> <p>which output the following graph:</p> <p><a href="https://i.stack.imgur.com/yM3wM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yM3wM.png" alt="mont...
0debug
Pip install without progress bars : <p>In my Django application I have a circle.yml file that runs 'pip install -r requirements/base.txt'. When I push up code, and check the CircleCI logs when there is an error, its hard to get to because there are so many dependencies and as of pip6 they started showing progress bars ...
0debug
static int ehci_process_itd(EHCIState *ehci, EHCIitd *itd, uint32_t addr) { USBDevice *dev; USBEndpoint *ep; uint32_t i, len, pid, dir, devaddr, endp; uint32_t pg, off, ptr1, ptr2, max, mult; ehci->periodic_sched_active = PERIODIC_ACT...
1threat
Julia - Trim string whitespace and check length : <p>I'm new to Julia and I was wondering if there were any built in functions for trimming string whitespace? I also want to check the length of the string which I know I can do with <code>length(s) == 0</code>, but I wondered if there where other built in functions? Tha...
0debug
document.write('<script src="evil.js"></script>');
1threat
Vue, is there a way to pass data between routes without URL params? : <p>I am looking how to pass data secretly between two separate components (not parent and child) without using URL params in my Vue2 app. This doesn't mean I am passing secrets but rather I just dont want the user to see it (only for UI consideration...
0debug
static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { int idx; CPUState *cs; CPUArchId *cpu_slot; X86CPUTopoInfo topo; X86CPU *cpu = X86_CPU(dev); PCMachineState *pcms = PC_MACHINE(hotplug_dev); if (cpu->apic_id == UNASSIG...
1threat
static void piix4_pm_machine_ready(Notifier *n, void *opaque) { PIIX4PMState *s = container_of(n, PIIX4PMState, machine_ready); PCIDevice *d = PCI_DEVICE(s); MemoryRegion *io_as = pci_address_space_io(d); uint8_t *pci_conf; pci_conf = d->config; pci_conf[0x5f] = 0x10 | (memory_...
1threat
static void test_self(void) { Coroutine *coroutine; coroutine = qemu_coroutine_create(verify_self); qemu_coroutine_enter(coroutine, coroutine); }
1threat
IBDesignable Build Failed : <p>I have Created <code>IBDesignable</code> and <code>IBInspectable</code> custom class to give shadow and corner radius for view</p> <p>But When I assign <code>Designable</code> class to <code>view</code>, I get Designable Build Failed</p> <p>This is my code </p> <pre><code>import Founda...
0debug
Refresh and fetch an entity after save (JPA/Spring Data/Hibernate) : <p>I've these two simple entities <code>Something</code> and <code>Property</code>. The <code>Something</code> entity has a many-to-one relationship to <code>Property</code>, so when I create a new <code>Something</code> row, I assign an existing <cod...
0debug
static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets, GArray *table_data, GArray *linker) { Aml *ssdt, *sb_scope, *dev; acpi_add_table(table_offsets, table_data); ssdt = init_aml_allocator(); acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); ...
1threat
str_replace, gives me the wrong result Only when numerals are in it : <pre><code>//post data $post = $_POST['username']; //str replace $print = str_replace([1,2,3,4,5], ['4A','6B','7C','2D','6F'], $post); //prints result echo "{\"username\":\"" . $print . "\"}"; </code></pre> <p>str replace works fine when it's just...
0debug
AWS EC2 - Can't launch an instance - Account blocked : <p>I'm trying to launch an EC2 instance on my personal AWS account, but getting the following error:</p> <pre><code>Launch Failed This account is currently blocked and not recognized as a valid account. Please contact aws-verification@amazon.com if you have questi...
0debug
Deploying dotnet core to Heroku : <p>I'm trying to deploy my dotnet core application to Heroku, but keep running up against this error:</p> <pre><code>Restore failed unknown keyword platform ! Push rejected, failed to compile Web app app. ! Push failed </code></pre> <p>When I use <code>dotnet run</code> fro...
0debug