back soft

مطالب مرتبط با «using» در back soft | نویسنده: استخدام کار

simple aggregation using elasticsearch

Vote count:
 0i am using elastic search to perform aggregation for hourly data and which is aggregated on basis of weekday name: sample data:{ val:40, hour:00, day:Monday } { val:10, hour:01, day:Tuesday } { val:30, hour:02, day:Wednesday} { val:40, hour:03, day:Thursday } { val:60, h...

ادامه مطلب

How to display records from a Firebase database using HashMap with Android?

Vote count:
 0I am developing an app in which the users can have multiple lists. My Firebase database looks like this:The model that i use is this:public class UserModel { private String userId; private String userName; private String userEmail; private HashMap lists;...

ادامه مطلب

How get daemons' status programmatically using Ruby gem "daemons"

Vote count:
 0I have a script (myscript.rb) like below:require 'daemons' Daemons.run_proc 'myproc', dir_mode: :normal, dir: '/path/to/pids' do # Daemon code here... end So, I can check the daemon's status in console by ruby myscript.rb status.But I need to show the daemon's status in a web page (Rails), like:Daemon status:...

ادامه مطلب

How can I declare an array with a variable, but without using malloc() in C?

Vote count: 0 So I have to create a 2D array which is going to be used to print a histogram. I know that the array is going to be 52 elements wide, but the height of the array is going to be equal to max + 1, which will be different every time the function it is in gets called. Ideally, the line would accomplish the following function: char histPlot[max+1][52] = ""; As I was writing my code, however, I leaed that C, or at least my compiler, does not allow an array to be declared without a constant value. The professor of the class I'm writing this code for was not clear on whether or not we could use malloc() for this assignment. Assuming I caot using malloc(), is there any way I can create ...

ادامه مطلب

NoSuchElementException using PhantomJS 1.9.2 in Visual Studio/C#

Vote count: 0 I've read all prior posts and tried all suggestions. I've verified the page is loading via taking a screenshot. It's there. I have a 30 second implicit wait in place, which PhantomJS waits for. I have a fully qualified URL. And i've tested the same simple code snippet below with ChromeDriver and it works by flipping to that driver. Any ideas? [TestMethod] public void TestMethod1() { var d = new PhantomJSDriver(); //var d = new ChromeDriver(); try { var s = "Google"; d.Manage().Timeouts().ImplicitlyWait(System.TimeSpan.FromSeconds(30)); d.Navigate().GoToUrl("http://www.google.com"); var e = d.FindElement(By.Id("lst-ib")); e.SendKeys(s); e.Submit(); Assert.AreEqual(d.Title, s); }...

ادامه مطلب

I didn't get response with Basic Auth URL using AFNetworking

Vote count: 0 I used postman and give me that code and i try. NSDictionary *headers = @{ @"authorization": @"Basic dXNlcl90c19hcGk6cW****************", @"cache-control": @"no-cache", @"postman-token": @"48ca81bb-eea4-7196-*******************" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.techshort.in/ts_api/category_list.php"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLRespon...

ادامه مطلب

Django objects.create() causing duplicate primary keys

Vote count: 0 I'm ruing load tests with JMeter on a Django project with a Postgres database. This has managed to cause duplicate primary key errors when creating M2M objects; IntegrityError: duplicate key value violates unique constraint "entry_entrycharityenquiry_pkey" DETAIL: Key (id)=(108) already exists. This is happening when trying to create the relationship to objects after a user has selected from a list; for ec in to_add: EntryCharityEnquiry.objects.create(**kwargs) I can't see a problem with creating objects in a loop, so where/what could the error come from? asked 8 secs agomarkwalker_ Let's block ads! بخوانید...

ادامه مطلب

How to get Location updates even when gps is turned off using fused location api?

Vote count: 0 This may be asked many time but i couldn't any solution for this i need to get user location in background for ever 15 min it works fine when gps is tued on but when gps is tued of am not getting location updates when gps is tued off at least need to get network location or wifi location how can i achieve this with fused location api. Location manager has this functionality but in fused location i don't think so as google suggests the developer to use Location play service api i don't want to use location manager how can i achieve this so let me post what i tried so far: mport android.content.Context; import android.location.Location; import android.os.Bundle; import android.su...

ادامه مطلب

Error using Thread.sleep in an Asynctask

Vote count: 0 I am trying to add some sleep-time in my Asynctask because right now my ProgressDialog is too fast when there isn't much data to load. I tried this: @Override protected Boolean doInBackground(Void... params) { try { progressDialog.setMessage("Loading first thing..."); firstThing(); progressDialog.incrementProgressBy(1); Thread.sleep(500); //...repeat above four lines a few times for second, third, fourth thing, etc retu true; } catch (Exception e) { Log.e("MyClassName", "There was an error: " + e); } } I am getting the error "Only the original thread that created a view can touch its views." asked 19 secs agoKaliMa Let's block ads! بخوانید...

ادامه مطلب

fetch data from the web services to stored procedure in SQL SERVER 2014

Vote count: 0 I have been assigned a task to fetch the tableset and dataset from the web services using the stored procedure in SQL SERVER 2014. Can someone help me with this case. I just wanted to know the syntax if the stored procedure. I am not able to understand how would I fetch data from the web services as it is not a database and they are going to call the procedure name only in their web service. Thanks in Advance asked 48 secs agopaemmi Let's block ads! بخوانید...

ادامه مطلب

Using tf() function in MATLAB

Vote count: 0 I'm trying to input this transfer function in matlab, but I can't figure out how because it has both positive and negative exponents. If I do H = tf([1],[1 1 1 1],0.1,'variable','z^-1') I almost get it, but I can't figure out how to add the positive z to the bottom. I'm trying to use this H to plot the poles and zeros with pzmap(H). asked 55 secs agoJake Let's block ads! بخوانید...

ادامه مطلب

GoogleMaps Marker issue when using the query parameter

Vote count: 0 I have a web application with coordinates for a single location, i want to display the map with a marker to this location using a lightbox dialog. Everything was OK regarding the map initialization and displaying in the Lightbox dialog. But when generating a url for google maps location (to be displayed as an iframe),and after i searched for this i found some solutions that uses (the q= and q=loc: parameters) So this url will let google display the location and make the map centered on this location But the problem is that this does not work in all cases, i tried the following locations and it worked perfectly: (using both q= and q=loc: parameters) https://maps.google.com/maps?...

ادامه مطلب

programming and practice chapter 6

Vote count: 0 #include "std_lib_facilities" class Token { public: char kind; // what kind of token double value; // for numbers: a value Token(char ch) // make a Token from a char :kind(ch), value(0) { } Token(char ch, double val) // make a Token from a char and a double :kind(ch), value(val) { } }; class Token_stream { public: Token_stream(); Token get(); void putback(Token t); private: bool full; Token buffer; } ; Token_stream::Token_stream() :full(false),buffer(0) { } void Token_stream::putback(Token t) { if(full) error ("putback() into a full buffer"); buffer=t; full=true; } Token Token_stream::get() { if(full){ full=false; retu buffer; } char ch; cin >> ch; switch (ch) { case 'q': case ...

ادامه مطلب

Php pdo select row using database row id

Vote count: 0 Previously am using mysql to loop on users data getting the table row by rws[0], now that i change to pdo i still need to use this rws[0] get each row instead of using the row name like this $id = $rws->id; in pdo how can i make this work in pdo? OLD MYSQL NEW PDO asked 1 min agoAlex Let's block ads! بخوانید...

ادامه مطلب

Table output to Word-2011 from Rstudio using knit

Vote count: 0 Trying to simply generate report ready tables JFT or monthly frequency summary tables in Word-2011 from Rstudio using knit from OSX. The archives suggest various solutions, such as HTML and asis, pandoc ( How to present a nice looking frequency table from R in MS Word), etc. All fail. For instance, the sample at the link above is nicely formatted with the variable names. The variable names are lost when I run the same code and the formatting is lost when knitted to in Word. Screenshots of the two cases are attached. The tables generated from the following code look respectable in fixed font on in Rstudio or R (look at output of jft.r if run on its own) but fail when knitted fro...

ادامه مطلب

Adding custom HTTP header to SignalR Hub

Vote count: 0 Is it possible to add a custom HTTP header to SignalR Hub from JS client when the coection starts? My SignalR hub is shared both by my mobile and web client. I can pass a header from the mobile client but I'm not sure if this is possible to do this from the web client. This is what I'm trying to do var name = Context.Request.Headers["useame"]; how do I differentiate between the web and mobile client? asked 1 min agoAhmed Mujtaba Let's block ads! بخوانید...

ادامه مطلب

Javascript - Using promise for post PHP, get undefined result

Vote count: 0 I'm a newbie in JS and have a little to no knowledge about asynchronous program and promise. I have a problem in getting result from post PHP as written in this code: showModalLink = function(d, i) { $('#myModalLabel').text(d.source.name + ' - ' + d.target.name); $('#modalJum').text(d.jumlahlelangsama); var lelang = d.daftarlelangsama.split(", "); var lelangmodal = []; var promises = []; for (var i = 0; i < lelang.length; i++) { querystring = "select pemenang from lelang where id = " + lelang[i]; console.log(querystring); var queryobj = { query: querystring }; promises.push($.post('indikasi3modal.php', queryobj)); } Promise.all(promises).then(function(results) { if (results[i] ...

ادامه مطلب

I am not able to fetch a proxy to struts action in JUnit test case using StrutsTestCase

Vote count: 0 I am trying to write JUnit test cases for an application written in Struts2. I am trying to follow the process given in these 2 links : https://struts.apache.org/docs/testing-actions.html https://glindholm.wordpress.com/2008/06/30/unit-testing-struts-2-actions/ I am using mockruer-servlet.jar, struts2-junit-plugin-2.3.15.jar, junit-4.8.2.jar apart from many other jars. Basically the problem that I am facing is at these 2 places in both the approaches : ActionProxy proxy = getActionProxy("//"); and dispatcher.getContainer() .getInstance(ActionProxyFactory.class) .createActionProxy( namespace, actionName, null, true, // execute result false); The exception I'm getting is : There ...

ادامه مطلب

How to do horizontal lines from a one column file using gnuplot?

Vote count: 0 Having a file with just one column of data like for example: 10 2 34 4.5 16 I'd like to plot a stack of horizontal lines as plotting a horizontal line from let's say -3 to 3 (x range) for a y value equal to the first row (10 in the example), then replot a another horizontal line ranging form x=[-3:3] with a y value equal to the second row (2 in the example), and so on. How can I do it? asked 26 secs agoGilberto Zapata Let's block ads! بخوانید...

ادامه مطلب

Using Filters in dynamic created data(array object) in angular controllers

Vote count: 0 static data is working with filters but having problem in dynamic data filtering Any and all help is appreciated. Thanks! asked 55 secs agoVikrum Bhalla Let's block ads! بخوانید...

ادامه مطلب