Vote count: 0 I have a Node app in a directory together with a text file called sample.csv. I'm trying to read the file line-by-line with the following code, but nothing gets read: var readline = require('readline'); var fs = require('fs'); var lineReader = readline.createInterface({ input: fs.createReadStream('sample.csv') }); lineReader.on('line', function (line) { console.log(line); // Never happens }); console.log('Completed.'); // Immediately skips to this Any bright ideas? :) Thanks! asked 1 min agoTed Nyberg Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have my program creating an array based on a time RNG, and whenever I do Thread.Sleep(120); it works fine to get my different numbers, however I have a display that's supposed to populate (Label) right after the random number has been generated. In my case, this does not happen. As the program itterates this function, it seems that it does all the calculations beforehand then shows the numbers. If I put a forced stop, such as a MessageBox.Show(" "); after the box shows up, the number that is supposed to be inserted into the box, is done at the same time, instead of after all numbers have been given. My code is this: void createArray() { var label = new List { label1, label2, ...
ادامه مطلبVote count: 0 I built a Google Cardboard app (or at least a Google Cardboard-compatible app with room for improvement) that works well on phones with 5-6" screens (iOS and Android) and a Google Cardboard viewer designed to work with those 5-6" screens. However, if viewing the app in a larger "phablet" screen, vision doubles and the app becomes useless for those devices. Since the app primarily runs in the phones' stock browsers Safari and Chrome, is there a way to scale down the app canvas/block element to stay within the 5-6" range on larger mobile devices? Here is a rough illustration of what I'm trying to accomplish: So far my search brings me to answers like this one, explaining that thi...
ادامه مطلبVote count: 0 Anyone know how this can be done? The TrafficStats source code notes that there is a supposed to be a special UID (UID_TETHERING) used to track this, but using the getUidTxBytes and getUidRxBytes APIs always retu zero. I've seen other apps have this feature and I was wondering if the TrafficStats API is the way to go about tracking tethering traffic. asked 2 mins agomaignacio Let's block ads! بخوانید...
ادامه مطلبVote count: 0 XML Input Solr Doc High HR Finance Output after parse: Title : Solr Doc Type_0 : High Group_0 : HR Group_1 : Finance What I have done to get the multi value value data? val data = val list = data.flatMap(_.child.map(_.text)).distinct val first_level = list(0) //Apply the logic in loop and get the result. Is there any better way to get the result especially which has multivalue data like Group and Type ? asked 2 mins agoDebaditya Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm using an INF file such as the one below to generate a CSR with "certreq.exe -new -q request.inf request.csr": [Version] Signature= "$Windows NT$" [NewRequest] Subject = "CN=subject" KeyLength = 2048 Exportable = TRUE MachineKeySet = TRUE SMIME = FALSE PrivateKeyArchive = FALSE UserProtected = FALSE UseExistingKeySet = FALSE ProviderName = "Microsoft RSA SChael Cryptographic Provider" ProviderType = 12 RequestType = CMC KeyUsage = 0 KeyAlgorithm = RSA HashAlgorithm = sha256 [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1 Is there a way that I can do this via .NET classes, and preferably without having to export the CSR to a file once it is generated? Thanks a lot for your ...
ادامه مطلبVote count: 0 I've been stuck for quite some time with the following code. It works but the variable loses the value that was set during the iterations. I have the following code checkIfLetterInsideWord(){ for (( i=1; i...
ادامه مطلبVote count: 0 I have problem with validate credit card details using Active Merchant gem. When I try insert new payment, always have error: The credit card you provided was declined. 2 Please double check your information and try again.. This mean that, response isn't success. I don't have idea why. I use code from tutorial: Active Merchant Tutorial payment.rb class Payment < ActiveRecord::Base require "active_merchant/billing/rails" attr_accessor :card_security_code attr_accessor :credit_card_number attr_accessor :expiration_month attr_accessor :expiration_year validates :first_name, presence: true validates :last_name, presence: true validates :card_security_code, presence: true validates ...
ادامه مطلبVote count: 0 pic from FSMH program Hi am a second year student master from Algeria, I have a memoir talk about subgraph mining, and I chose algorithm FSMH. It's my fist experience in hadoop. I want ask you, have any one idea how I can use this perl commandes in hadoop streaming?? pleaseenter image description here thanks every one asked 1 min agoAbdelbaki Youcef Juvérpool Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am attaching a C program and two cfg files corresponding to the program. First cfg file is generated by using the gcc -fdump-tree-cfg command and the second cfg is obtained after performing some manual optimizations on the gcc generated cfg. In the first cfg file there are many temporary variables like a.0, b.1 etc. It seems that these varaibles can be replaced/removed without effecting the semantics; as shown in the second cfg file. My Question is that: Is it always possible to remove these temporary variables or there are some peculiar cases in some more complex programs when they can't be removed? Is there a flag/command available in gcc to pervent creation of these (so ma...
ادامه مطلبVote count: 0 I have the requirement in below way .I need XMl element for xslt table inline style.Please check the below code. XML pseudo code:- --------------- This is the xml code which contains the following data This is message #66666 XSLT CODE:- ---------- My CD Collection //something in this way i need use So i need to use inline style as xml element . is there any solution for this and suggest me where i can lea xslt with xml and java In simalar way i need to add css file in that also i need to use this xml element of color value Thanks in advance asked 2 mins agouser3770726 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am working on an Iphone Application and I have implemented quickBlox Api in it...I am here to ask that how can we put the call on hold and Add new call to my Application. asked 1 min agowaqar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 i want to do as per image . so basically screen - full area is scrollable . top is layout where horizontal scroll is present . below that Tab layout and view pager 2.Screen - when user scroll down then header part which is horizontal scroll will go (up not visible) and tab layout will be sticky header it always at top and only his view pager is swappable .but when again he scroll up then top header should come image as follow i am ref this https://github.com/kmshack/Android-ParallaxHeaderViewPager but its not as per my need asked 1 min agoandro Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to create a caretaker. This is my model: class Caretaker(models.Model): user = models.OneToOneField(User) language = models.ForeignKey('Translation', blank=True, null=True, on_delete=models.SET_NULL, verbose_name=_('language')) patients = models.ManyToManyField('Patient', through='CaretakerPatient') specialists = models.ManyToManyField('Caretaker', through='CaretakerSpecialist') name = models.CharField(_('name'), max_length=50) email = models.CharField(_('e-mail'), max_length=100) time_zone = models.CharField(_('time zone'), max_length=50) is_primary = models.BooleanField(default=False) active = models.BooleanField(default=True) As you see there is a relation oneTOone wi...
ادامه مطلبVote count: 0 I have made some classes and their mapping classes using Nhibeate and done configuration but i don't how database will update without make any manually update? is it possible? asked 34 secs agoSufyan Ahmad Let's block ads! بخوانید...
ادامه مطلبVote count: 0 At the moment, I convert the vec3 to vec4, multiply it with the matrix, and then cast it back to vec3 Code: glm::vec3 transformed = glm::vec3(matrix * glm::vec4(point, 0.0)) It works, but I think it is not the good way to calculate it. Is it possible to apply a mat4 on a vec3, without casting it to vec4 and back? asked 2 mins agoIter Ator Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am new to Restful and AngularJS. I have one requirement in which i have to upload any MIME file into database using RestFul and AngularJS. asked 1 min agoRahul Maurya Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to log into server to receive a json file back. But the server needs a useame and pass word. I don't know how to add that into my build. I looked at a lot of sources but I caot figure it out what to add to my builder. Thank you very much for any help Here is my OkhttpHandeler code public class OkHttpHandler extends AsyncTask { OkHttpClient client = new OkHttpClient(); Response response; Request request; private final String apUrl = "http://xxxxxxxx.xxxxxx.com/api/1.0/promotions"; String output; String picture; //JSon Data String jsonData; JSONObject jsonObject; JSONArray jsonArray; @Override protected String doInBackground(String... params) { RequestBody formbody = ...
ادامه مطلبVote count: 0 We are using XCC to communicate to Marklogic. We wanted to implement optimistic locking. This is to ensure noone has updated on stale data. I see there are some documentation around implementing this using Java API. Can someone please help me in understanding if Optimistic locking is possible using XCC API and redirect me how to do this. Thanks asked 37 secs agoshashi prakash Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have read all the tutorial about AJAX in this site but I still can't figure this out. I need to get the userid variable from a PHP page. Here is what I am doing: code HERE is what I am getting Result How can I only get the variable and not the whole page? thanks, asked 1 min agouser3352263 Let's block ads! بخوانید...
ادامه مطلب