id
stringlengths
5
11
text
stringlengths
0
146k
title
stringclasses
1 value
doc_7000
I am trying to use webpack to bundle then all together but so far no success. Here is what I have so far. Any thoughts? If you know of an online resource, please post the link. My goal is to have the minimum amount of HTTP requests and have everything minified. 'use strict'; const webpack = require('webpack'...
doc_7001
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link type="text/css" rel="Stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/redmond/jquery-ui.css" ...
doc_7002
fact(a,1). fact(b,10). fact(c,100). I want to be able to use a rule of this type: rule(fact(A,10),fact(c,B)):- write(A), write(B). A: You use the fact predicate as a query, e.g. rule :- fact(A,10), fact(c,B), write(A), write(B). Addition: to interpret your question more literally, you want to do somethi...
doc_7003
java.sql.Date Sqldob = new java.sql.Date(date1.getTime()); System.out.println("date" +Sqldob); Time Sqldob1 = new Time(date1.getTime()); System.out.println("User Time: " +Sqldob1); String yourTime="09:30:00"; ...
doc_7004
require_once('recaptchalib.php'); $privatekey = "my key"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $errCapt='<p style="color:#D6012C ">The CAPTCHA Code wasnot entered ...
doc_7005
Not sure what I've done wrong. Any Ideas? $(document).ready(function() { $('.greybox').wrap(" <div class='margin'> <div class='cont_wrapper'> <div class='border_top'> <div class='border_right'> <div class='border_bottom'> <div class='border_left'> <div class='tr'> <div class='tl'> <div class='br'> <div class='bl'> <d...
doc_7006
public class CustomAdapter extends BaseAdapter { private Context context; ArrayList<String> list = null; public CustomAdapter (Context context, ArrayList<String> list) { this.context = context; this.list = list; } l public int getCount() { return list.size(); } ...
doc_7007
(delete-selection-mode f) to my init.el file but that had no effect. By which I mean, if I highlight a region and type something, the contents of the selection are replaced with the new typing. I also tried toggling the mode with M-x delete-selection-mode command, but that had no effect. I use Emacs 24.1.1 on Windows7...
doc_7008
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); Date date = new Date(); is that possible to directly insert it into the database without converting to the default format (dd-month-yyyy) of DATE data type in Oracle? A: You did not give any context on what interface you are using to communicate with the DB...
doc_7009
What does it mean? What happened? Is there a way to tell Angular or Chrome to show more verbose error information? Here is my app.js file. Nothing else is included: 'use strict'; // Declare app level module which depends on filters, and services var vsApp = angular.module('vsApp', [ 'ngRoute', 'vsApp.filter...
doc_7010
A: This depends on how the link is generated. For example: If your link contains a username as GET-parameter, then you could simply query your database if the username is already in use. I would advise against that, because the user can easily change that GET-Parameter I would recommend this: Your link should contain ...
doc_7011
When I use the class 'fixed-top', it looks ok but doesn't follow as you scroll down. When I use 'sticky-top' it makes the background the navbar white. <nav class="navbar navbar-expand-md navbar-dark bg-dark sticky-top"> <div class="container-fluid"> <a href="#" class="navbar-brand">Brand</a> <butt...
doc_7012
I don't understand why I've only NAN values. A: You can change [['date']] to [date] for select Series instead one column DataFrame. Sample: df = pd.DataFrame({'A':[1,2,3]}) print (df['A']) 0 1 1 2 2 3 Name: A, dtype: int64 print (df[['A']]) A 0 1 1 2 2 3 print (df[df['A'] == 1]) A 0 1 print (df...
doc_7013
I created a field named « subtitle » which is supposed to appear on an overlay, on the portfolio thumbnails of my theme. I inserted the code like that: $gallery .= '<h2 class="portfolio-title">' . $title . '</h2>'; $gallery .= '<h3 class="portfolio-subtitle">' .the_field('subtitle') .'</h3>'; ...
doc_7014
I was hoping to mimic that functionality in C# with my XML Editing Form. Is there already a form control (freely available) that does this? A: I think you are looking for the BindingNavigator control, which is already included. You haven't said what version of Visual Studio you are running. This answer assumes VS200...
doc_7015
Thanks A: The source of Html.Styled.program shows that it just wraps your styled view function with toUnstyled. You should be able to do the same thing with your input to Navigation.program: import Html import Html.Styled import Navigation main : Platform.Program Basics.Never model msg main = Navigation.program u...
doc_7016
I tried using AND "$variable"="value", ie AND "true"="true" but InfluxDB was interpreting it as a field and not just a boolean expression.
doc_7017
My current setup is Visual Studio 2010 + Resharper (very convenient for running Unit Tests - set up a Unit Test Session and there are the Run and Debug Tests buttons). Still, I feel like there may be ways to accelerate TDD even more (e.g.: when saving a tests file automatically run the tests in it). So, TDD experts usi...
doc_7018
the problem: When I run p5serial (in a shell window) or p5.serialcontrol (an Electron/GUI app), the node server starts out at ~ 12 MB, but as it runs it bloats quickly to > 1 GB and the output becomes sluggish. The server eventually dies with FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of...
doc_7019
<form name="CheckIn" method="post" action="check.asp" onsubmit="return CheckBreakTime() && CheckTime();" > I call two functions whit onsubmit,the functions return true or false,but function works only if it's "first" ,for example if i say ' onsubmit="return CheckTime() && CheckBreakTime();" ' onl...
doc_7020
>>> import re >>> m = re.findall("(SS){e<=1}", "PSSZ") >>> m [] I am trying to find the total number of occurrences of SS (and incorporating the possibility of up to one mismatch) within PSSZ. I saw a similar example of code here: Search for string allowing for one mismatch in any location of the string A: You nee...
doc_7021
Thanks for the help. A: Check out django-haystack. It provides you a search engine for your models. It needs some configuration but it works well. After you've configured it, you can create a custom endpoint using its search views
doc_7022
Given a serializeable Class with lots of Properties to serialize, I want some of them to be an Attribute of an another one. Sample Serialize a Class like that [Serializeable] public class MySerializeableClass { public string AnyPath { get; set; } public bool IsActive { get; set; } } The result would be <MyS...
doc_7023
* *Apply Zebra striping to the Table (Completed) *Change Row color to red based td value ​` <tr class="alt"> <td class="status"><input type="text" value="One"></td> <td class>Received</td> </tr> <tr class="alt"> <td class="status"><input type="text" value="One"></td> <td class>Received</td> </tr> ...
doc_7024
png to svg conversion gives me below output: <svg xmlns="http://www.w3.org/2000/svg" id="svg" version="1.1" width="963" height="694" x="0mm"><path id="svgpath" d="M488.000 339.563 C 228.675 525.701,12.725 680.731,8.112 684.074 C 0.525 689.571,-0.128 690.300,1.278 691.706 C 2.684 693.112,19.064 681.613,172.681 571.380 C...
doc_7025
Once it gets a list of matches it updates a DynamoDB table in the following way: requestId (partitionKey) ID matches status uuid1 ID1 [match1,match2, match3...] FOUND_MATCHES For each match in this table, a message is sent to SQS which is listened to by a Lambda. For each match, the Lambda will make a call ...
doc_7026
Here is how I created my object: avg_payment = { labels: ["Jan"] datasets: [ { label: "Average_payment" fillColor: "rgba(220,220,220,0.5)" strokeColor: "rgba(220,220,220,0.8)" highlightFill: "rgba(220,220,220,0.75)" highlightStroke: "rgba(220,...
doc_7027
interface rigidBodyData{ spriteName: string spriteSizeX: number spriteSizeY: number idleAnim: string mass: number } And I import it to the subclass import rigidBodyData from "./Enemy" export default class Crabby extends Enemy{ public rigidBody: Phaser.Physics.Arcade.Sprite private dataList: rigidBodyDat...
doc_7028
string entity = "some text in here"; byte[] _entity = Encoding.UTF8.GetBytes(entity); Stopwatch sw = new Stopwatch(); sw.Start(); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); request.Method = "POST"; request.ContentLength = _entity.Length; request.UserAgent = UserAgent; request.ContentType = "appli...
doc_7029
ProcductCode AS Id, ProductPrice AS Price FROM Products WITH (NOLOCK) WHERE ProductCode = 'efg' OR ProductCode = 'abc' OR ProductCode = 'xyz' In the above query the I want to have the returned data in order by ProductCode but not the default ascending or descending but rather by the order in which ...
doc_7030
#include <iostream> #include <string> using namespace std; int main(){ string animal = "fish"; string guess; char choose = 'Y' ; int count = 0;//keeps a running total of how many times the user has guessed an answer. int limit = 5;//allows user to guess only 5 times, otherwise they loose the game...
doc_7031
I want to display product_name and added_date but I have the following condition to display the results * *For product_name column: if multiple records with the same product_name are registered, the latest id value should be displayed. *For added_date column: multiple records with the same added_date are registered,...
doc_7032
Here is the current entry to my .NET application's web.config <forms loginUrl="Login.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseCookies" enableCrossAppRedirects="true" domain=".mydomain.com" />...
doc_7033
When receiving this message reply via our webhook called by Twilio, from which field can we get the orgiginal message ID the whatapp user replied directly to? Edit: Possibly related: Reply to specific whatsapp message on whatsapp api
doc_7034
if you do fix it, please provide a good explanation so i can avoid similar mistakes in the future, thanks :-) var traitementTimeOut; function frm_valider(idFrm,url,idMsgDiv,InputIds){ if(js_validerFrm(InputIds)==false) return; document.getElementById(idFrm).submit(); functionAappeler = "frm_valider_tra...
doc_7035
data = json.loads(request.body) Therefore data looks something like this: data = { 'fullName': 'John Smith', 'dob': '1970-01-01T00:00:00', } Given I also have a JSON schema definition: schema = { "title": "Person", "type": "object", "properties": { "fullName": { "type": "string" ...
doc_7036
I have create 1 records to test. However when i run EXEC Verify(2) with the records that is not i created for testing it will still show the tested records which is not i like to verify on. I like to exec the PROCEDURE with the set of EMPLOYEE.E# that i select to run the compare of the EMPLOYEE do not exist in DRIVER a...
doc_7037
Here's the loop part of the code: def loop(): randomhex = binascii.b2a_hex(os.urandom(4)) hash_object = hashlib.sha1(randomhex) hashh = hash_object.hexdigest() print(hashh) if hashh == sha: done() else: loop() A: you cannot use recursion for a loop like this Here's a small vi...
doc_7038
Does it contains timezone information ? I am asking this because i want to compare two different date instance. So if it does not contain timezone information, the day difference will be wrong with different timezones UPDATE: I run a quick unit test to verify, first convert date instance to milliseconds and convert bac...
doc_7039
I'm wondering if there is a simple way to "pause", "resume" and "reset" the way that Matplotlib cycles through default colors without implementing it manually. Example below is not a good way to do it manually, but just illustrates how hypothetical colorpause(), colorresume(), and colorreset() might be used. def color...
doc_7040
// Program to generate a user specified number of // fibonacci numbers using variable length arrays // Chapter 7 Program 8 2013-07-14 #include <stdio.h> int main(void) { int i, numFibs; printf("How many fibonacci numbers do you want (between 1 and 75)?\n"); scanf("%i", &numFibs); if (numFibs < 1 ...
doc_7041
const myData = function(){ return [[{"number":1,"name":"Jack","day":"Sat"}, {"number":2,"name":"Max","day":"Sun"}], [{"number":3,"name":"Al","day":"Mon"}, {"number":4,"name":"Jacky","day":"Tues"} {"number":5,"name":"Daniel","day":"Wed"}]]; }; var array = myData(); var len = array.length; var i, j; for (i=0; ...
doc_7042
#include<stdio.h> #include<unistd.h> #include<fcntl.h> #include<string.h> void foobar(char *a){ char c = a[0]; } int main(){ int fd = open("file.txt", O_RDONLY); char buf1[100]="\0"; char buf[100]; int aa=0,b=1,c=2,d=3,f=2,g=3; read(fd,buf1,104); if(strlen(buf1) > 100){ }else{ ...
doc_7043
And I want to make it like this in Oracle SQL: How can I write code in SQL? A: You can use the conditional aggregation as follows: select subjid, max(case when status = 'most recent dose' then date end) as most_recent_dose max(case when status = 'second most recent dose' then date end) as second_most_r...
doc_7044
A: You do not need to begin a new project. The basic steps are: * *Install DRF, something like pip install djangorestframework *Add rest_framework to your INSTALLED_APPS *Define your serialisers, views and routes. And that's it. I suggest you follow the Quickstart and step through the Tutorial — it's pretty w...
doc_7045
when I try to run it I get a long error which ends with: line 6 07, in url_patterns raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e django.core.exceptions.ImproperlyConfigured: The included URLconf 'djangoProject.urls' does not appear to have any patterns in it. If you see valid patterns in the f...
doc_7046
this is my loop: foreach(string exhibit in hidExhibitsIDs.Value) { comLinkExhibitToTask.Parameters.AddWithValue("@ExhibitID", exhibit); } when I hover over the .value it says it is "string". But when I change the "string exhibit" to "int exhibit" it works, but gives me an internal error(no...
doc_7047
My actual data has many more columns than the test data below. This approach seems to be pretty quick. My question is whether there is a quicker way? # number of groups n <- 100000 dat <- data.frame(grp = factor(rep(1:n, each = 10)), var1 = rep(c(1:8, NA, NA), times = n), var2 = rep(c(1:7, N...
doc_7048
To Start with I would like to just to be able to make a component that I can draw a line to x and y points. I want my JComponent class to have every method that should be in a JComponent class even if it is not used. Thus I would like a list of every method that needs to be overridden for creating ones own JComponent. ...
doc_7049
proc test1 { a {b 2} {c 3} } { puts "$a $b $c" } A: Here's one technique, a bit messier that what you're hoping for but not too messy: proc test1 { args } { # set the default values array set values {b 2 c 3} # todo: validate that $args is a list with an even number of items # now merge in the ar...
doc_7050
I need to build a program which will ask users to enter their grades for 1)assignment1 - 25points 2)assignment2 - 25points 3)assignment3 - 25points 4)assighment4 - 25points 5)exam1 - 100 points 6)final exam - 100 points 7)final project - 100 points total points for all of the assignments is thus 400 points Users are n...
doc_7051
that lead to a solution there that do not work for me. I use Qt 5, with openCV 3 with Mac OS X 10.10.5. When I use macdeployqt, this process does not have the proper paths for the openCV .dylib files. It complains with: ERROR: no file at "/lib/libopencv_core.3.0.dylib" ERROR: no file at "/lib/libopencv_highgui.3.0.d...
doc_7052
Basically, I have a typedef to an unsigned char known as viByte, which I'm using to create a string buffer to parse a file from binary (a TGA file, to be exact - but, that's irrelevant). I'm writing basic functions for it right now; append, prepend, new, etc. The problem is that, on the first iteration of the first loo...
doc_7053
Open-sans doesn't work in IE so I'm searching for a way to change it depending on the browsers. I tried looking at this question but still didn't understand how to accomplish this task. A: You could use conditional comments in HTML, to detect the Internet Explorer lower than IE 11. http://de.wikipedia.org/wiki/Conditi...
doc_7054
AJAX <script type="text/javascript"> $(document).ready(function(){ $(".infitem").offset({ top: 0, left: 0 }); $(".item").hover(function(){ var op = $(this); var pos = $(op).offset(); var height = $(op).height(); var width = $(op).width(); $(".infname").html...
doc_7055
It says that 'ins1.addEventListener is not a function'. The error: The javascript code: $(document).ready(function(){ if(sessionStorage.getItem('ins')){ const ins1 = document.getElementsByTagName('4092520690'); var newIns = sessionStorage.getItem('ins'); var newParam = sess...
doc_7056
sc.wholeTextFiles(path) and the key of fileRDD is file name, the value is file content. When I traverse a file content(value), I can get a lot of information. So I want to generate multiple RDDs after traversing a file. For example: I define three class public class Interface implements Serializable public class VPNI...
doc_7057
That's why I added the following code piece into Start.Auth; //app.UseFacebookAuthentication( // appId: WebConfigurationManager.AppSettings["appID"], // appSecret: WebConfigurationManager.AppSettings["appSecret"]); var MoreFacebookOptions = new FacebookAuthenticationOptions { ...
doc_7058
A: Here's how you can do it I have given example of flutter_typeahead which is also used for autocomplete This is the test case group('App', () { final saveButton = find.byValueKey('save_button'); final cityField = find.byValueKey('city_field'); final city = 'Mumbai'; FlutterDriver driver; // Connect to the Flutter ...
doc_7059
I though I succeed at doing so since I could run all the test, the problem comes when I try to mvn clean install it. After doing so, the tests don't pass anymore in eclipse or mvn install but after project->clean tests pass again running in JUnit eclipse UI and mvn install. I'm guessing the problem maybe comes from the...
doc_7060
I am fiddling with htm -> txt file conversion and am having a little trouble. My project is essentially to convert the messages.htm file I downloaded of my Facebook chat history into a messages.txt file with all the <> brackets removed and formatting preserved. The file messages.htm is parsed into variable text. I the...
doc_7061
#include <stdio.h> #include <unistd.h> int main() { pid_t pid; printf("Parent\n"); pid = vfork(); if(pid==0) { printf("Child\n"); } return 0; } I got the output as follows: Parent Child Parent Child Parent Child .... ...
doc_7062
Here's a very simple example of what I mean: class A(object): def __init__(self): self.__type='parent' def type(self): return self.__type class B(A): def __init__(self): super(B,self).__init__() self.__type='child' x=B() print x.type() Python returns 'parent' as the result...
doc_7063
Does anyone have any ideas how this could be modified, or a better approach to take? function testSuite() { describe("jquery.flickbook", function() { it("makes testing JavaScript awesome!", function() { expect(true).toBeTrue(); }); }); } function testAllJquerys() { var jquer...
doc_7064
This is the code I have thus far: <!doctype html> <html> <head> <title>Late Fee Calculator</title> <meta charset="utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text...
doc_7065
A: U need to generate a XML file and to parse the value in the android application. Use the sax parser to parse the values: http://developer.android.com/reference/javax/xml/parsers/SAXParser.html Here is an example on how to parse: http://www.ctctlabs.com/index.php/blog/detail/parsing_xml_on_android/ http://prasanta-...
doc_7066
* *. build/envsetup.sh *lunch sdk-eng *make -j(thread num) update-api *make -j(thread num) sdk *The SDK is located under /out/host/linux-x86/sdk/sdk/ Then configured Android Studio to use the new SDK: * *Open Android Studio's Preferences --> Android SDK *Edit the Android SDK Location with the new SDK path...
doc_7067
I can guess what the query it is generating is, but just wanted to verify. e.g. var query = Post.find() .regex('lowerCaseTitle', searchRegEx) .$gte('status',0) .$lt('start', now) .$gt('end',now) .sort('total', -1) .limit(50); A: Another option: model .find() .{{...}} // any thing else .setOpt...
doc_7068
$Servers = Get-Content .\servers.txt foreach ($Server in $Servers){ try { Get-CimInstance Win32_OperatingSystem -ComputerName $server -ErrorAction Stop | Select-Object CSName, Caption, Version, OSArchitecture, InstallDate, LastBootUpTime | Export-Csv -append .\result.csv } catch { $Error[0].Exception | Expor...
doc_7069
The array is generated from MS Excel and works fine with PHP array functions. When I use "foreach" loop to extract data, I get the 'Undefined Index' error but when I dump the value of the index, I get desired results. The code extract is as below: foreach ($membership_data as $data){ //dd($data["Gender"]); ...
doc_7070
public class uploadphotos : ApiController { public Task<HttpResponseMessage> Post( ) { // Check if the request contains multipart/form-data. if (!Request.Content.IsMimeMultipartContent()) { throw new HttpResponseException(HttpStatusCode.Unsupport...
doc_7071
The screenshots above have come from an android 5 emulator (albeit quite old now its still technically supported by flutter so I wanted to test this) and I get the same problems on a physical device running android 7, but the icon seems to appear fine on any versions above. Something else I have noticed is that no ap...
doc_7072
with open('C:\emp.csv', newline='') as f: eligible = [] reader = csv.reader(f) for row in reader: eligible.append(row) I'm trying to create a new list removing duplicates from one created in a regular for loop. I typed them both and they show up as lists. I get this error when trying to remove dupl...
doc_7073
form definition: <form method="post" action="index.php?page=report_result"> When the form method is "post" all is ok. after submitting the form, the page I get is with the right url: mna.co.il/index.php?page=report_result I wanted to see the whole url with all the sent parameters, so I changed the form method from "...
doc_7074
What's the easiest way to do that please ? I heard of AWS Lambda and Microsoft Azure Machine Learning Studio but I am not sure it would work with word2vec. For example with AWS Lambda, would I need to reload the libraries each time (it takes a while to do that). And can I install any Python package with Microsoft Azur...
doc_7075
* *Problem: Couldn't pickle the Class object to use with Queue(). Solution: Moved serial_run_data outside Class object so that it could be pickable (I also tried pathos.multiprocessing with no success) *Problem: GUI would plot a couple of samples then hang (probably to do with the queue communication). Solution: Att...
doc_7076
void processAPrice(); void getPriceInPounds(priceInPounds); void convertPriceIntoEuros(int priceInPounds); void showPriceInEuros(); void calculateSum(); void produceFinalData(); int main() { char answer('Y'); int numberOfPrices(0); while (answer = 'Y') { processAPrice(); ...
doc_7077
I want all of the threads to run over a long time. I kind of want to use queues and thought about a something like this: from threading import Thread import Queue import time import random nr_of_workers = 3 class SyncData(Thread): def __init__(self, q_in, q_out): Thread.__init__(self) self.setD...
doc_7078
Now I want to bind the first item of the List<int> to the first column of the DataGrid, and the second item to the second column. How to do it? XMAL: <DataGrid.Columns> <DataGridTextColumn Header="MyClass Name" Binding="{Binding Name}" ></DataGridTextColumn> <DataGridTextColumn Header="First Item of Numbers" ...
doc_7079
#include <vector> using namespace std; struct Base { Base(vector<int> numbers) { //Do something with numbers } }; struct Derived: public Base { Derived(vector<int> numbers): Base(concatenate(numbers, {4,5,6})) {} //Is there a built-in "concatenate" function? }; int main (int argc, c...
doc_7080
Essentially, every Application can have one or more forms. Each applicant can have one or more forms. And one applicant can have one or more addresses; however, for sake of simplicity, I only want to return one address. SELECT APPLICANT.FIRST_NAME, APPLICANT.LAST_NAME, ADDRESS.STREET, ADDRESS.CITY, ...
doc_7081
let x = "hello"; return x; } fn get_str2<'a>(str1: &str) -> &'a str { let x: &'a str = (str1.to_string() + "123").as_str(); return x; } fn get_str3<'a>(str1: &str) -> &'a str { let tmp = str1.to_string() + "123"; let x: &'a str = tmp.as_str(); return x; } #[test] fn lifetime_test() { ...
doc_7082
I have created some test data in amplify and use the following code to render the data: import * as React from 'react'; import PropTypes from 'prop-types'; import Tabs from '@mui/material/Tabs'; import Tab from '@mui/material/Tab'; import Typography from '@mui/material/Typography'; import Box from '@mui/material/Box';...
doc_7083
A: You can use an Alert Dialog with two Number Pickers. Here is a sample example of Months picker XML will be like this <NumberPicker android:id="@+id/pickerMonth" android:theme="@style/AppTheme.Picker" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginE...
doc_7084
NSExpression *e = [NSExpression expressionWithFormat:formul]; int result = [[e expressionValueWithObject:nil context:nil] intValue]; NSLog(@"formule:%d", result); I am trying to calculate (a+b)^2. A: Use ** instead of ^ NSString *formul=@"3 ** 2"; NSExpression *e = [NSExpression expressionWithFormat:formul]; int resu...
doc_7085
That's my code: private void LoadXMLFile() { WebClient xmlClient = new WebClient(); xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded); xmlClient.DownloadStringAsync(new Uri("codeFragments.xml", UriKind.RelativeOrAbsolute)); } private void XML...
doc_7086
I started the app with a tabbar template, because this should be shown after the splash screen. the first tab has a navigation controller (configured in IB) which loads a custom view controller (I called it searchViewController.h/.m/.xib) on his stack. my problem: if I run my app, the screen keeps for a long time black...
doc_7087
[a-z]{-}[d] However, I am trying to use these operators as in the following code, but I always get errors: invalid_id "char"|"else"|"if"|"class"|"new"|"return"|"void"|"while"|"int" all_ids [a-zA-Z_][a-zA-Z0-9_]* id {all_ids}{-}{invalid_id} Is there any way to make it work? Can these ...
doc_7088
I am trying to create a command which lists the first or last n lines (number specified by the user) of every file in a directory which is also specified by the user. They also have the option of using head or tail. HEADORTAIL=$1 NUMLINES=$2 DIRECTORY=$3 if [ $# -lt 3 ] then echo "The command needs three argum...
doc_7089
Images: problem problem cont from tkinter import * from time import * from calendar import * class Application(Frame): def __init__(self, master): Frame.__init__(self, master) self.grid() self.create_widgets() def create_widgets(self): days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'...
doc_7090
import numpy as np from keras import backend as K from keras.layers import Layer import tensorflow as tf class myLayer(Layer): def __init__(self, n=None, **kwargs): self.n = n super(myLayer, self).__init__(**kwargs) def build(self, input_shape): self.output_dim = input_shape[1] ...
doc_7091
Here is the XML file content: <Params> <Param name="Paramètre #1"> <Value> 1.1 </Value> <Value> 1.2 </Value> <Value> 1.3 </Value> </Param> <Param name="Paramètre #2"> <Value> 2.1 </Value> <Value> 2.2 </Value> </Param> <Param name="Paramètre #3"> <Value> 3.1 </Value> ...
doc_7092
Wouldn't both be bad to store session data in since having a lot of users will eat up memory?
doc_7093
SELECT table1.value FROM table1 LEFT OUTER JOIN table2 ON `table1`.`id`=`table2`.`id` where `table1`.`id`='this value no exist' this return nothing, but i want a null or "" , like it +--------+ | table1 | +--------+ | null | +--------+ | | +--------+ A: One method is to use aggregation to get one row with a...
doc_7094
public static boolean dbDelete(Collection argObjectCollectionToDelete) { boolean result = true; for (Object object : argObjectCollectionToDelete) { boolean dbDelete = dbDelete(object); if (!dbDelete) { result = false; } } return re...
doc_7095
void Class::method1(int &a); and are called like this: int a; class->method1(a); But sometimes I see structures like: void Class2::method2(int* a); And these methods are called like this: int a; class2->method2(&a); I understand that in the first case the method accepts an address of a variable, and in the second -...
doc_7096
Is there anyway to do this without using images? To illustrate: A: For those who are having the same issues down the road, I figured it out. ratingBar = (RatingBar) findViewById(R.id.rbMyRating); ratingBar.setIsIndicator(true); ratingBar.setOnTouchListener(new OnTouchListener() { @Override public boolean onTo...
doc_7097
I have 2 table UserInfo and UserType. Now when I want to get userInfo then I want to set UserTypeName to display in grid with other UserInfo and for this I have used below code. public List<UserInfoBind> SearchBindUser(UserInfo objSeacrh) { try { List...
doc_7098
Could not cast value of type 'UIView' (0x10a8e7f40) to 'Charts.LineChartView' (0x1074f63a0). How can I achieve that multiple charts in same table view? Thanks in advance. cellForRowAt indexPath: let cell = myTableView.dequeueReusableCell(withIdentifier: "chart") as? GraphicCell var lineChart:LineChartView = cell?.c...
doc_7099
I've got to call an application via COM interop from a C# .NET application. I've written a wrapper class to handle the COM stuff and all that works nice and shiny. public sealed class ComWrapper : IDisposable { private Application comApplication = new Application(); // Referenced COM assembly. private bool dis...