« first day (616 days earlier)      last day (458 days later) » 

3:45 PM
ha
317 messages moved from mooR
 
0
Q: Map not showing for android app

q1w2e3I'm not able to see the Map on my Activity. I get this error on the console when running the app. Things that I've done: API is Enabled for Google Maps Get the SHA1 fingerprint from debug.keystore Added the SHA1 fingerprint with package name Put the API Key in the manifest What is the problem ...

0
Q: How to post object using HttpURLConnection and get DTOobject in Dnn web api

HajekDanielI'm posting an object using HttpURLConnection from my Android App into the server. Into Android App: URL url = new URL("some url"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestProperty("User-Agent","Mozilla/5.0 ( compatible ) "); con.setRequestProperty("Accept...

0
Q: convert timestamp to time , fetch time from json

Abhay KumarI have to process the following josn { status: "delivered" bookmarked: false created: "2015-07-08T09:23:23.656Z" } I have to convert the "created" format to time , I am not so sure how to convert it . I Have tried using the Calendar class , but no luck . I guess "2015-07-08T09:23:23.656Z is...

0
Q: Detect Facebook Mobile Browser

Moskau PetersonIs it somehow possible to detect Facebook's mobiles apps' browser via PHP or JS? My apps all have problems inside their browser (in native browser not!) and I want to show a warning notice. Alternatively, is there a possibility to directly open the website in a external browser?

0
Q: Create profile Urls in django

NeelI am trying to make my first ever Django app (i.e. i am an absolute novice).I have made a simple form where an user can enter an username. When the user clicks on submit, i wantto redirect him to the url containing that profilename entered by the user (don't worry, i am already doing a uniqueness...

 
5 messages moved from mooR
 
4:08 PM
0
Q: extract numbers from string in bash script

zhoudingjiangMy code is like this: xinput list | grep TouchPad then I get: ⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)] I save this output to a string variable in this way: touchpad=$(xinput list | grep TouchPad) So, my question is, how can I save the ID number 14...

0
Q: Couple questions about Jquery toggle sidebar

icecreamrabbitOkay. So I have a sidebar menu on my project. The toggle/expand icon is on my header bar to show it. When I click a link within the sidebar when I open it, it goes to the linked page, except now when I go to load the sidebar on the new page it won't work. It only works if I refresh the page. Al...

1
Q: Function not firing on first click

AnthonyI have a button that takes 2 functions onclick. Here is my button: <button id="btnNext" onclick="increment(); Next();">Next</button> The increment() function works as intended on the first click but the Next() function does not. It does work as intended after first click. If I remove the incre...

0
Q: Custom gridview adapter is slow or moves elements around

user2988879I am trying to create a gridview with images and text. I have this code: public View getView(int position, View convertView, ViewGroup parent) { View gridView; if(convertView == null){ LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SER...

0
Q: Initializing two arrays of structs referencing each other

SF.The program has multiple phases, and as one ends, a choice is made to pick a new one. struct PhaseChoice; struct Phase { PhaseChoice* choices; }; struct PhaseChoice { bool (*condition)(); Phase* newPhase; }; ...this forward declaration works okay. But I have trouble initializ...

0
Q: How to add files to your respository on github?

Nikki Beeso I'm new to github, and I'm having issues using it. I made a repository, but I have to idea how to add files to the repository. How do I go about doing this? Also, I have a PC if that helps. Thanks:)

0
Q: Inconsistent macro output across identical machines

pinqI have an Excel (VBA) macro that is having a functionality issue whereby it isn't filling text into cells in two specific files (the third works as intended). The identical macro is being used on a number of different computers. The code is exactly the same, the References inside of the VBA inte...

0
Q: Color Thief - Canvas: Cannot set property 'parseFont' of undefined

Mitch FUsing node --> using color-thief. Error in terminal: /node_modules/color-thief/node_modules/canvas/lib/context2d.js:64 var parseFont = exports.parseFont = function(str){ ^ TypeError: Cannot set property 'parseFont' of undefined at Object.<anonymous> (/User...

0
Q: MySQL join tables with subquery

prodirectorI have this crazy query below. I want to organize them but don't know how. Can someone help me run this query? I want to join the 5 sub-query tables below and at the end, the result would be a table displaying line item_id with last5days, last10days, last30days, last60days, last90days. Thanks a b...

0
Q: Floating point variable's value missing in data memory

Shuaiyu JiangI am a master student and currently doing my summer final project, which is about design a MIPS processor with a FPU and implement in a FPGA. The instructions that I'm going to implement are depended on the cross-compiler I'm using. So, from a hardware designer point of view, I started the proje...

0
Q: php-mysql executes extra explain sql

sparkmixI've two servers that running the same php application code and pointing to same database. One server is redhat and the other one is ubuntu. But the one in ubuntu seems to run extra explain sql when php code executes some sql query. My application code is the same in both servers. I even turned ...

0
Q: scheduling cucumber test features to run repeatdly

ChuchooI have cucumber test(feature files) and lately I have a need to execute one of the feature repeatedly on a scheduled time. I have cucumber test in RubyMine IDE.I haven't found a way to do so. Any idea or thoughts on scheduling that feature file? Appreciate. Thanks!

0
Q: How should I filter items of a user?

Christian FazziniI am using Ember 1.13.2 and Ember Data 1.13.4. The API conforms to JSON API format (http://jsonapi.org/format). A user has many items. Doing {{model.items}} in the template will return ALL items of the user. What if I also need to display ONLY blue items from the user. How should I go about thi...

0
Q: Magento 1.9.2.0 - Permissions Issue with Ajax Loader

Jeremy RimpoWe've discovered a major new issue in Magento 1.9.2.0 related to the permissions updates. When a user is given manually set permissions - even if every single permission box is checked, the ajax loader fails to 'complete' and does not remove the loading spinner when the data is received. (But the...

0
Q: mysql_num_rows doesn't work when there are no rows

k97513First off, yes, I know mysql_num_rows is deprecated. Now, continuing on to the actual question, I'm making a page where users can post things and other users can like them. But when the post displays, and the user viewing them didn't/hasn't liked the post, the mysql_num_rows doesn't work. Here's ...

0
Q: Swift 2: understanding AnyObject and Self

DevAndArtistI couldn't find any good explanation to my questions so I'd like to ask you directly. First of all I'd like to refine my code in this post. My problem is the protocol 'AnyObject' and the 'Self' type. I din't implement AnyObject into my code because it is marked with '@objc' and I don't want any ...

0
Q: Boost, geometry

Yury PanyukovI have a problem with boost::geomentry. #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <vector> int main(){ typedef boost::geometry::model::d2::point_xy<double> TBoostPoint; typedef boost::geometry::model...

1
Q: How do you return to calling object from another object in Java?

alisonObject A instantiates Object B. After the user interacts with Object B, I want to return back to Object A because Object A needs to use the user-determined results in Object B. User answers questions in Object B. Is there anyway to do that without instantiating a new Object A and passing the ...

0
Q: Time complexity for functions within if condition

abysmalproWhat would be the time complexity for these kind of if statements? Consider the following time complexities : func1 = O(n) and func2 = O(n) if(func1()) { return func2(); } Will the time complexity be O(n^2) or just O(n)?

0
Q: preg_match and regex - allow or exclude characters

MegaKaskaskasI have problem with allowing specified characters in preg_match. I've tried making following pattern: /^[A-Za-z0-9 !@#$%&()-_\[\]:;\"'|,.\?\/]/ Right now it allows everything, even * which is not there. I know that there's this rule that before regex specified characters I have to put "\" before...

0
Q: Why does IE "paint" function create lag when editing textarea?

sniederbWe're experiencing a fairly annoying lag in typing whenever our web application is used via Citrix VDI. The lag is most noticeable on a modal dialog where the user can edit a comment field. The dialog is standard bootstrap: <div class="modal" id="id_ov_notes_editor" data-backdrop="static" data-k...

0
Q: Java - word length frequency

Liam MallinsonIm creating a java program which counts the frequency of letters. For example - “I am a man” would produce the output “2, 1, 1” (that is, two words of length 1 ("I", "a"), one word of length 2 ("am") and one word of length 3 ("man"). So far I have this code. Its reading line of text from a txt ...

0
Q: search term does not work

Hamed MinaeeI am using twitter4j to get tweets from twitter, I want to search for the tweets that has both #sarcasm and American politician in them but when I use the following I get nothing: "#sarcasm"+"American politician" Do I do it correctly? can anyone help?

0
Q: Django template multidimensionnal array acces in for loop

Raphaël GomèsI ran against an annoying problem in a Django template. I have a 3 dimensional array and want to loop through the first dimension in my template as such : {% for item in array %} {{array.i.0.0}} {% endfor %} Now, I am aware that this would not work, since i is undefined, but I've tried using {{...

0
Q: D3 Brush coordinates under CSS transform scale

intuinnoD3 brush does not function properly under css transform scale. When svg is under div element, and div element is transformed using CSS scale, the brush operation shows wrong coordinates. To demonstrate this case, here is the jsFiddle. It is simple modification from Bostock's Brushable Netwo...

-1
Q: remove <li> with jquery remove() does not work

HazHazCan someone help me please? Everything is working good but not the remove part in my code.. Thanks in advance! http://pastebin.com/gNRyfq3D (HTML page) http://pastebin.com/dGuEMVpg (JS file)

0
Q: android - adding views is too slow

user3425760I need to add about 10 views to ScrollView and I use the following code final LinearLayout item_div = (LinearLayout)activity.findViewById(R.id.item_div); final LayoutInflater inflater = (LayoutInflater)context.getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); for (int i ...

0
Q: Upload photo and send it as a json object

AbdallahI am using the view to upload a photo then I receive it in the controller as HttpPostedFileBase then I send it in an Http request and things are just fine but when I recieve the http request in json object the photo comes as null` here is the request: public ActionResult RegisterUsersCheck(U...

0
Q: Prevent delay image display

user908998I'm using jQuery to create an effect with mouseover on certain elements on the page. Each element has a "normal" background image, Upon mouseover, the image changes and a new background image is loaded. Mouse out, and the normal background image is restored. Obviously, I could do the same thin...

0
Q: Are server signed tokens enough to ensure requests come from my mobile app only?

sp00mBuilt on Spring, my server exposes a REST api. Authentication is done via server signed tokens, as explained here. Built on Cordova and AngularJS, my mobile app communicates with this server via asynchronous requests. If a user reaches my authentication token endpoint from somewhere outside my ...

0
Q: How to Measure an App'd Perfomrace?

arvindI have created a Winforms app in C# . What I'd like to know is how optimized/resource-demanding my app is. How much memory and cpu power it is dragging and so on. I have tried to look at the Task manager and tried Visual Studio's Analyzer . Is that enough? Or there are better ways to do so?

0
Q: Navigation View. android.support.design:itemIconTint ,android.support.design:itemTextColor xml attributes not working

Daniel OdroñezThe new Navigation View provided in the support library for using the material design, int changing the xml parameters: - android.support.design:itemIconTint - android.support.design:itemTextColor I've found in the Class reference that this parameters can change through java coding but i want t...

1
Q: How to improve MongoDB insert performance

JamesMongoDB 3.0 / WiredTiger / C# Driver I have a collection with 147,000,000 documents, of which I am performing updates each second (hopefully) of approx. 3000 documents. Here is an example update: "query" : { "_id" : BinData(0,"UKnZwG54kOpT4q9CVWbf4zvdU223lrE5w/uIzXZcObQiAAAA") }, "updateob...

3
Q: Javascript timezone bug between Feb 9, 1942-Sept 30 1945

chubbsondubsI have a Date from Jan 13, 1943 at 4:00am UTC. It's being converted by Javascript to Jan 12, 1943 11:00PM EST (GMT-500). However, according to Day Light Savings Time history for the USA the period between Feb 9, 1942-Sept 30, 1945 was permanently DST. My server handles this correctly inserting...

0
Q: Laravel Query Not work with where condition

Portle74I am trying to get my query result with where condition . My current query is $last_query = DB::table('user_matchs')->where('matched_user_id', '=', $UserId)->where('status','=','friend')->lists('user_id'); $mid_query = DB::table('user_matchs')->where('user_id', '=', $UserId)->lists('ma...

0
Q: How to perform a button action with a key press in extjs?

seuser1012I have a form in which I enter details in the fields and press on the "Search" button, it checks if the fields are entered properly. Based on that it either searches or prompts the user to enter additional details. Pretty standard. Now I want to perform the same action so that when the user hits ...

0
Q: Custom user implementation in web api token authentication

AncientI created a new web api 2 project give it a run and everything is running perfectly . Now i want to get users from my database instead of UserManager . public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) { var userManager = c...

0
Q: How should I handle a HTTP response whose body takes time to generate, and whose headers cannot be determined until generation is complete?

Lightness Races in OrbitBackground My web application lives on a centralised server in the product's "network", and provides the means to manage/configure various distributed devices. The server also logs various statistics that arrive from each device, storing them on disk in /var/log/. The web GUI allows users to dow...

2
Q: Python Queue and Threading confusion

pineapplemanI made a sniffer in Python which calculates the size of IP packets. I tried to get the size in two ways: 1) simply by calculating len(pkt) 2) by extracting the packet length from the IP header and adding 14bytes for the ethernet header When comparing the result from len(pkt) with the extracted...

0
Q: How to access Internal Phone Databases in a Cordova App

Dustin HuxI am creating a mobile application in Visual Studio 2015 with the tools for Apache Cordova. How can I access internal phone databases like the call log in this type of an application? I have been able to access the contact list by downloading a Git Plugin but i can't find any plugin to access t...

0
Q: ASP.NET MVC 5 localization and routing with DropDownList

user3375954I am currently developing a project with multiple languages and routing (MVC). I got the project from the following link: http://www.jittuu.com/2014/3/17/AspNet-localization-routing/. But now I need that languages can be selected by a Dropdownlist without using submit button. What codes should I ...

0
Q: How to search a specific row to find a specific string in excell files(Apache POi)

Christos AntoniouI am writing a program and i want when i give the program a String name search the excel file and the specific row given for the String in the specific row...For example i have an excel file that is : names Chris Pavlov Anton Nick John And i want when the String variable name is John to fi...

0
Q: jqGrid getRowData is returning formatting not column entries

Fordro47I have a jqGrid and when I print this out to the console currentRowData = $('#mainGrid').jqGrid('getRowData', selRowIds[i]); console.log("here2 "+ JSON.stringify(currentRowData)); I am getting a weird formatting and not the actual entries for the columns. For example when I hav...

0
Q: slf4j with log4j, no configuration files but I can see logs in file

BufBillsworking on a project using slf4j with log4j(coa I can see all needed log4j jar files in place. Not using loopback or java logging util.) But I could not find any configuration files (such as xml file) anywhere. But I can see all logs go to a file with DEBUG level on. My question is, is this the d...

-8
Q: We can make a miracle http://igg.me/at/tfAd2SqYbo8?

Andrei Baranceanuhttp://igg.me/at/tfAd2SqYbo8 Not on the subject, but from the heart.

2
Q: how to sort with different number of digits in java?

bootsectorI created a list of files in a directory with f.listFiles(). Unfortunately they are very differently named like: 001.pdf 098.pdf 100.pdf 1000.pdf now the array of files in the directory sets the 1000.pdf before the 100.pdf. How can I sort this so that the files areback in the right order? Thanks...

0
Q: Cannot get a property of a Json-String

mm1975I get a Json-String from a table-API: JS var data = JSON.stringify($table.bootstrapTable('getSelections')); console.log(data); Output: [{"name":"Chemical Entity Recogniser (ChER)","state":true}] Now I want to get the value of "name", but It do not work with: console.log(data); Output: [ ...

1
Q: Python variables lose scope inside generator?

alavin89The code below returns NameError: global name 'self' is not defined. Why? lengths = [3, 10] self.fooDict = getOrderedDict(stuff) if not all(0 < l < len(self.fooDict) for l in lengths): raise ValueError("Bad lengths!") Note that self.fooDict is an OrderedDict (imported from the collections...

0
Q: Nuget restore fails with FileFormatException

TheJediCowboyI have Jenkins CI running commands that build my docker containers. One of the steps for building my containers requires that I run the following NuGet restore.. RUN mono /usr/bin/NuGet.exe restore /src/MyApp.sln -Verbosity detailed About 50% of the time, the build works, and the other 50% of ...

0
Q: Apache + Python Error child pid 25999 exit signal Segmentation fault (11)

SatishWe are running httpd-2.2.15-39.el6.centos.x86_64 with Python-2.7 with mod_wsgi/4.3.3 and we added some ajax code in application but sometime i am getting following error in logs, I did coredump of apache but don't know what to look? [Sat Jul 04 20:45:40 2015] [notice] child pid 25999 exit signal...

0
Q: Getting a Working Meteor JS Vagrant Box

David J. DavisThe Problem I want to keep all of my development files in vagrant so that passing them to other developers we can all run a similar environment. I've created my provision files and keep getting the following error. After hitting google I tried a few different things, and I'm still not gett...

0
Q: Export Google Analytics log of events

PholochtairzeI have some applications and a website that trigger Google Analytics events. I would like to export google analytics events to my datawarehouse in order to have better insights and analytics. For this question, you can use the language you want (python, ruby, java, etc.). I'm not an expert in G...

0
Q: Flickr API Oauth (node-flickrapi) cache oauth_verifier

Colin A. WhiteI've been having fun with the authenticated Flickr API via Oauth and have got it working with node.js thanks to the node-flickrapi NPM. Each time I run my code the console is telling me to - add the following variables to your environment: export FLICKR_USER_ID="8443423@N08" export FLICKR_ACCES...

0
Q: When do we use denyAll in spring security

ZackI am a bit confused as to why someone would use @PreAuthorize("denyAll") for a method. As per the spring security documentation, it always evaluates to false. If we are not going to allow access to a particular method, what is the point of keeping such a method. Why not comment it out? Or is it t...

0
Q: Http server live streaming in python

George SubiI want to send the live output of ffmpeg command to every GET request, but I'm novice in python and can't solve it. This is my code: import subprocess # for piping from http.server import HTTPServer, BaseHTTPRequestHandler class RequestHandler(BaseHTTPRequestHandler): def _writeheaders(sel...

0
Q: Mac OS X: clang-omp cann't find header files (xgboost installation)

SoWaRI'm trying to build multithread supporting xgboost according to this guide. So i made fist three steps. But when i run: cd xgboost make i get this message: /Users/user/clang-omp/build/bin/clang++ -c -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -fopenmp -fopenmp -fPIC -o updater.o src/...

0
Q: INDEX/MATCH Returning the wrong value. What did I do wrong?

Chef1075I'm trying to create an spreadsheet where INDEX/MATCH automatically populates monthly sales goals. However, it is returning the wrong number. In cell B7 I want the value to be 10000. In columns G and H, I've set the goals and the corresponding date in the hopes of matching the goal to the date...

0
Q: Confused about Javascript Execution Order

LukeI have implemented isotope and masonry though plugins on Joomla, and I'm intermediately knowledgeable about jQuery, but this is confusing the heck out of me. When items are hidden through the filter, I would like to remove a light box attribute, then when they show again, I would like the lightb...

0
Q: add number to all elements of a list within a class?

Wilsonwatsonso I have a class with a list, and I would like to add a number to all the elements of that list, but not to every list in the class. I tried this: class class_name: def __init__(self,list_name,other_list): self.list_name = list_name self.other_list = other_list list1 = [1.0...

0
Q: django two digit integer in choice field

bWF800I have a form that I want to submit date as mm/yyyy class Add_Serv(forms.Form): month_add = forms.ChoiceField(required=True, choices=['01','02']) year_add = forms.ChoiceField(required=True, choices=[(x, x) for x in xrange(date.today().year - 1, date.today().year + 1)]) and when my month pr...

1
Q: Private static member in base class

Ashot#include <iostream> #include <string> class Base { static std::string s; }; template<typename T> class Derived : Base { public: Derived() { std::cout << s << std::endl; } }; std::string Base::s = "some_text"; int main() { Derived<int> obj; } This programs...

-1
Q: Manage selection in text kit using swift

user3638160I want to convert the following void function written in objective-c to swift but it won't work the way I do it. -(void)applyStyletoSelection:(NSString *)style{ // 1. Get the range of the selected text. NSRange range = [_textView selectedRange]; // 2. Create a new font with the selected text ...

-2
Q: I never knew you could do this in PHP, but is this valid?

EquinoxMattI have coded in PHP for over 10 years and this is the first time I have come across this (legacy code base): $string = "123456789"; $new_number = $string[1] $new_number is now 2. Am I going crazy? I never knew you could add to a string with [x].

0
Q: Looping through JSON children objects

Danielok1993So I am looping through mid-complex json object and saving all the values when I reach the end of recursive loop Object e.g. "if": { "and": { "or": { "compare": [ { "Hello": { "constant": { ...

0
Q: Symfony2 deploy - authorization error

Abdel5I am deploying symfony2 application. I have already been able to log in successfully and debuger shows that my roles are: Roles [ROLE_ADMIN, ROLE_USER] However when I try to access any of my webpages (e.g. ****.pl/app/choosebook/1) I got: 403 Forbidden You don't have permission to acces...

0
Q: How unmanaged object is destroyed/collected in C#

IgorStackHere is a scenario: There is a class defined in managed c++ dll and used in C# project. public ref class AClass { // ...... XParameters m_oParams; property XParameters^ Parameters { XParameters^ get() { return m_oParams; } } } XParameters is another managed c++-defined ...

0
Q: Putting List Results into Objects

syllablecakeI am receiving a response from my server that looks like this: [ { "_id": "559d443abae4f14958f6a854", "owner": "559d4323bae4f14958f6a852", "__v": 0, "updated_at": "2015-07-08T15:39:38.370Z", "expiration_date": "2015-07-13T17:07:59.933Z", "addre...

0
Q: sails-auth generators doesnt work

user3293587I want to setup social authentication on my Sails app using sails-auth but my generator doesnt work. here my .sailsrc { "generators": { "modules": { "auth-api": "sails-auth" } }} on terminal sails generate auth-api like the documentation, and this is the error No generator cal...

0
Q: Big O notation confusion, trick to solve

Larry ZhangHey guys I'm just getting started on big o nation and complexity, I get confused by the problems below: My question is what is the trick to solve them all, do I look at the notation of each equation? really lost 1. In O() notation, write the complexity of the following code: For each item N ...

0
Q: Continuously Updating XML File via Flash AS3

user3813707I have a .as file, let's say its called Working.as. This file has snippets of code that add Event Listeners to objects on stage, and extract the color of each of these objects that are clicked on. Each time any object is clicked on, I need to write to an XML file and save the XML file accordingly...

0
Q: Wikipedia API - coordinates parameter

Matteo CappellaI have a question concerning this query performed with wikipedia API: {{#coordinates:primary|40.775114|-73.968802|type:landmark_region:US-NY|name=Loeb Central Park Boathouse}} I would like to know if this query search exactly the place in those coordinates or near those coordinates. I'm new i...

0
Q: I am trying to solve an assignment on coursera..its called best hospital

SidI was trying to solve an assignment on courser....It is to find the best hospital in USA. I made a small dataset on the basis of the original dataset.. when I the function on small dataset it gives correct answer. but when I run the function on bigger dataset, for some values I am getting result ...

0
Q: Rounding float to nearest integer in C

Vlad DanilaI might have a noob question here, but searching the site hasn't yelded anything. I'm learning to program in C and I'm trying to build a function from scratch that rounds floats to the nearest integer, without using math.h. Here's my code: void main() { float b; for(b = 0; b <= 2; b = b...

0
Q: Setting fixed width for parent table

NoobsterI have read around css properties for tables but I fail to understand why I cannot set a fixed width for my parent table: it always gets overridden by css properties further downstream. e.g. my code below: Any idea how I can set the table to width 200, and then get the text to wrap in the nested...

0
Q: Retrieve specific data from JSON using AngularJS

user1937021HI from the following snippet of JSON: "comments":{ "count":2, "data":[ { "created_time":"1436046658", "text":"Omg!!!! \u00bf!Pediste fondue?!", "from":{ "username":"shanlynch", ...

0
Q: Java Override toString for multiple member variables

user3417078I have the following class public class Foo() { private long var1; private float var2; private double var3; /* getter and setter */ } To print a numeric value to command line, I use String.valueOf(obj.getVar2()), but this will result in 9.888888888. Are there any ways, to prod...

0
Q: Let &mut syntax in Rust

koluchIt is possible to make following binding in Rust: let &mut a = &mut 5; But, what does it mean exactly? For example, let a = &mut 5 creates immutable binding of type &mut i32, let mut a = &mut 5 creates mutable binding of type &mut i32. What about let &mut?

0
Q: How to delay shutdown/restart/hibernate in windows 7 or windows 8 in VC++

Rex..I am using vs2012 based application developed using C++. If application is running and doing some processing and user triggers restart/shutdown or hibernate, then restart/shutdown should be suspended until application processing is done. Once application processing is done, windows should resum...

0
Q: jQuery parents has both classes

troyrmeyerI'm trying to create an if statement for <a> tags that have two classes. I've successfully implemented the following to check for one class: if ($("a").parents().hasClass("class1")) { // do something... } But how do you look for two classes, for example an elemen...

0
Q: How do you print a function in python? I got stuck when attempting this. Nothing is output and I don't see what's wrong with it? Could anyone help me?

Davinadef add(a,b): return a+b print(a+b) def subtract(a,b): return a-b print(a-b) def multiply(a,b): return a*b print(a*b) def divide(a,b) return a/b print(a/b) print('Please select an operation:') print('1.Add') print(2.Subtract') print(3.Multiply') print(4.Divide') c...

0
Q: Running an executable remotely on virtual machine from local computer with PSTools

Choub890I'm trying to run an executable that is in c:\Script\SCInstallerScript\SCinstaller.exe on a virtual machine from my local computer. To do this, I have done an F# app: let commandLineArgs = processArgs argv // Connexion to the desired vSphere let vmwareInterface = new VMwareInterface(commandLine...

0
Q: How to check programatically if Android device is in MTP or PTP mode

doesn't_know_androidHow can one check within an app if an Android device is in MTP or PTP mode? Cyanogenmod's one-click installer app does this, so I know it has to be possible, but I can't find anything like a Settings value that would give me this information.

0
Q: Position relative in firefox causing problems with google-map-markers clickable area

MarrixThe clickable area around a google-map-marker is shifting/misplaced when text (or other content) is added before the map-div. It is working fine in chrome, ie etc. - only firefox seems to cause this problem (as far as I can see). When - in web-console - changing map-div's elementstyle from 'rel...

0
Q: jQuery slider value above slider

chris masefieldI have a slider that I need help changing, when I slide the slider the value should appear above the slider. This is my slider / values: http://gyazo.com/342b1592d5d175b7321efb36cbc2424c Also my slider value should be whatever the first value of the slider is and NOT 0. JavaScript: $(functio...

0
Q: Oracle External Table - How to convert field to a date?

totalitarianI'm loading some data into oracle using an external table. One of the fields "CREATEDON" is a date but is formatted like this 20151231 How can I convert CREATEDON to a proper oracle date datatype. This is my attempt so far which doesn't work... CREATE TABLE "AMS"."DATA" ( "BLANK" VARCH...

0
Q: Unable to retrieve notes with the OneNote API

komplexbAim: Use Rails to retrieve list of notes in a defined section. As seen in lines 249-287 of GetPagesExample.cs Problem: Receiving 401 when I attempt a GET which indicates an authentication problem. I'm using the OneNoteAPISampleRuby as baseline, to achieve this. The sample comes with examples of ...

0
Q: Spring MVC Controller method post and no post

user2280764Is there a way to write two different controller methods for the same URL, with one handling normal requests, and one handling post requests? Like this: @RequestMapping("/url") public String requestWithoutData() { return "view"; } @RequestMapping(value="/url", method=RequestMethod.POST) public...

0
Q: XML Rendering is different in IE and chrome?

user2689563I am showing XML on browser by using below method. string fn="first_name"; string ln = "last_name"; string ec="0"; string desc = "Success"; string xml = "<response><variables><var name=\"" + fn + "\" expr=\"" + fName + "\" /><var name=\"" + ln + "\" expr=\"" + lNa...

-1
Q: REST Client made with Boost.Asio

xybrekI've been trying to make a REST client that can connect with HTTPS with Boost.Asio. So far, I was able to run with Boost.Asio, but far from complete. Are there any codes out there that shows a complete REST client based on Boost.Asio. Something that can be plugged in into a Visual Studio projec...

-2
Q: Project Euler probem 100

isuumathis is my code for Project Euler problem 100: t=(10**12)#707106783028 import math while True: num=(2*t*(t-1))+1 tmp=math.sqrt(float(num)) if tmp%2==1: answer=(tmp+1)/2 break t+=1 i got 707106783028 blue discs when 1000000002604 total discs. >>>float(707106783028*7...

-3
Q: How can i replace : with _ in java string

BrijeshI am new to java and i want to replace special character : with _ in a particular string Example String src="HH:MM"; required string HH_MM i.e replace : with _ tried replace src.replace(":","_"); but does not work

0
Q: Use window.open without resetting hash?

RichardI have a window with a hash parameter set. If I then do window.open (I want to allow the user to download some data as CSV), it resets the hash in the current window: window.location.hash = 'helloworld'; var csvContent = "data:text/csv;charset=utf-8,id,name\n3,james'); var encodedUri = encodeU...

0
Q: Excel Drop Down with IF

J SI want to create a sheet that uses drop downs and fills in some blank spaces based on selection. Let's say the drop down has Apple, Banana, Cucumber, and Pear. When I create the tables for each one, I have additional information for each one. A1 is the finding word (vlookup) and the other 3 in t...

-2
Q: Which is the best book for advance Object-Oriented programming?

Gurleen SethiI have learned JAVA and basic concepts of OO, i want to make my OO concepts more stronger. Which book would you recommend for best OO practices?

0
Q: Can't save metadata in custom plugin with custom metabox?

Frederik WitteWith the tutorial series of codeacademy.cc(https://www.youtube.com/watch?v=33bilBgZrb4) I tried to create the following plugin. However, it doesn't save the metadata. I don't know what is happening here and I can't find out why it is not saving it. I put different "die" functions into the if clau...

0
Q: Unable to determine successfull receiving of file

gikarasojo kineneI'm trying to send a file from server to client in java using ServerSocketChannel in the server class and SocketChannel in the client class. Both class objects are in blocking mode. The file is been sent very well but am unable to programmatically determine that the file has reached! i have to g...

0
Q: Possible to create a pip freeze requirements file off the libraries used in a single directory or file?

rernI use pip freeze > requirements.txt in my directory and it stores all the installed libraries on my machine. Is it possible to reduce this down to the libraries used in this directory or maybe just a single python file?

0
Q: Sort dictionary with multiple keys

JoeUsing Python 3.4, I am trying to sort a dictionary with two identical entries. When I run, my_dict = { '6/18/2015': [6, 'a'], '6/19/2015': [18, 't'], '6/17/2015': [3, 'r'] } for key, value in sorted(my_dict.iteritems(), key=lambda kvt: kvt[1][0]): print key, ':', value ...

1
Q: Semaphore for pausing actions, not limiting concurrent actions

tdimmigI have a method that's called constantly by many threads that looks up data in a data structure. When that data structure needs to be updated, I need to block all threads attempting the lookup until the update is complete. I could use a semaphore with X permits, and have the update method acqui...

0
Q: .NET MVC -- Use a class as the model?

Casey CrookstonIn my MVC app, several view models are going to pretty much identical. Rather than replicate the model each time, I'm thinking I could just create a class instead. What I'm not sure about then is how to include that class in each model. For example, let's say one my models would look like this...

0
Q: DotPeek PDB generation for assemblies without debug directory

Jason MorseI'm attempting to use JetBrains dotPeek 1.4 symbol server however I've encountered some 3rd party assemblies that fail, with dotPeek status of: Pdb has not been generated because assembly does not contain debug directory Using CFF Explorer I've discovered that these assemblies have empty "Debu...

0
Q: METIS: different results on different OS

user744629This C program calls METIS to partition a mesh. On my GNU/Linux I get the results: objval: 14 epart: 0 0 0 0 0 1 2 2 1 0 0 1 2 2 1 2 2 1 npart: 0 0 0 2 0 0 1 1 2 2 2 1 2 2 1 1 8 while on my OSX I get: objval: 17 epart: 0 1 1 0 1 0 2 2 0 1 1 1 2 2 1 2 2 0 npart: 0 1 1 1 0 1 0 1 2 2 2 0 2 2...

0
Q: has_many :through creating child after_save --> ActionView::Template::Error

Leo BrownI have three models: List, Food, and Quantity. List and Food are associated through Quantity via has_many :through. The model association is doing what I want, but when I test, there is an error. test_valid_list_creation_information#ListsCreateTest (1434538267.92s) ActionView::Template::Error: ...

0
Q: col-md-offset looses it's flushness

kdweber89I had an issue with some positioning of four divs. these four divs are in two columns. The problem that I had was that when the top div on the right side became larger (height wise) than the two divs on the left side combined, the bottom div on the right side slid over to the left side underneath...

0
Q: Python 3.4.3: Safe way to print unicode strings to a console?

kdbWhen writing one-off scripts for file management, I am often using the print function to verify if e.g. the list of files I am operating on is what I intend it to be. Consider e.g. for path in glob.glob("*.mp3"): print(path) On Windows (including Cygwin when LANG=C is used, so this may ap...

0
Q: OpenIDE's Lookup fails with Gephi controller objects

jmcniffI was able to run the demos just fine and build up a graph builder in my unit tests, but now when I deploy this and run on my local server I get NullPointerExceptions on some but not all of the lookups I call. ProjectController pc = Lookup.getDefault().lookup(ProjectController.class); ...

0
Q: Maximum line line supported by logstash?

user3366706What is the maximum character length does logstash can read as a single event from a file (single line input, NOT multiline input)? Also does logstash take specific number of spaces/tabs in between a line as newline?

0
Q: compare-object not displaying all differences

Jake JonesI have a new admin on our team, and she is having some permissions issues. Some things the new admin runs in Exchange Powershell are giving weird errors that the rest of the team doesn't get, and google doesn't help with figuring out what those errors mean. So we figure it must be a permissions i...

0
Q: Apache Sqoop in silent mode?

user3858193May I know if we can run sqoop commands in silent mode? Here I am executing sqoop eval command inside the gen_source_hive_data_import.sh. In the command line I can see the below logs. May I know in any way we can hide. I am executing this command in bash shell. <<< sh gen_source_hive...

-2
Q: What is java reflection?

Mariam JamalCan someone pls elaborate precisely what java reflection does with examples and give an explanation of the syntax of this code that I got through some online tutorial, please? String sClassName = "android.app.NotificationManager"; try { Class classToInvestigate = Class.forName(sClassName); ...

0
Q: Structuring page counter MYSQLI

hfwI'm going to be building a page counter for a site to determine views of different pages. Basically, I have users that I'd like to track with respect to page views of about 120 specific pages. I'm having trouble determining the most efficient way to do this as well as the logic behind it. I was ...

0
Q: Multithreading on SLURM

DolphinGenomePyramidsI have a perl script that forks using the Parallel::ForkManager package. To my knowledge if I fork 32 child processes and ask the SLURM scheduler to run the job on 4 nodes, 8 processors per node that the code will execute each child process on every core. Someone in my lab said that if I run a ...

0
Q: Warn if column is missing in a data step

Ross GoddardI had a recent problem where I was using a data step to create an output file and one of the columns had been renamed. The data step executed normally filling in the now missing column with nulls without any errors or warnings. It did add a note in the log saying that a variable was undefined but...

0
Q: Sorting a CrossTab Report Crystal Reports

davegeekgoliathRecently I had a problem with sorting a crosstab. I finally found a way to display the results as expected so I thought my solution may eventually help somebody else. The "original order" doesn't work within Crystal Reports crosstabs unfortunately. The original "order by" section of my sql quer...

0
Q: Hover Tool for Stacked Bar Bokeh

jenrybI'm confused how to make the hover tool call the two main variables of my stacked bar plot. I know bokeh doesn't support ColumnDataSource, which is what I've used before. I've tried calling "@months" but it's an Ordereddict so it's not calling right. # get the months Jan = pivot_table[1].astype(...

0
Q: Checking if an element has a specific ID

LOL. NO.I'm still new with JavaScript and jQuery. I'm trying to check to see if this certain html code has an element with a specific ID. For example: <select id="id1">...</select> <select id="id2">...</select> How do I check to see if a select element has a specific ID (or if it exists) in this exam...

0
Q: Cross-selection on two tables

Issam IbnouhseinI am struggling about the best approach to the following problem: I have a first table with columns: (index1,flag1,date1,date2) where date1 and date2 delimit the period during which flag1 is activated, and a second table with columns: (index2,flag2,date3,date4) with a similar interpretati...

0
Q: How adding property to function works?

BodzioWhen you write something like this in console: function doSomething () { // doing something } doSomething.someProperty = 42; doSomething // doSomething() doSomething.someProperty // 42 Why code like this works? What happening there under the hood? I thought that you can only add propert...

0
Q: Converting a string to an array C++

user3628498I am creating a program that takes a VIN number and checks to see if it is valid by solving for the check number (if you don't know what this means it doesn't really matter). My problem is that I need to take a users input, which a 17 character string, and put it into a char array. How do I go fr...

-1
Q: NameError: global name 'GetID' is not defined

SimplicityI'm getting an error in this line: chartNode.AddArray(pairs[0], pairs[1], GetID()) Stating: NameError: global name 'GetID' is not defined Does that mean I have to have a function definition for GetID()? Thanks.

0
Q: C# AcessExceptionViolation with Marshal.Copy

DipodinoI'm translating a program from VB to C# which communicates with an external program MMTTY.EXE. This program has ActiveX controls for VB6.0 and I added to my C# project in Visual Studio 2013. The code in VB is this: Dim m_nmmr(63) As Long Private Sub XMMR_OnNotifyNMMR(pNMMR As Long) Call CopyMem...

-2
Q: Location based home page in php web page

user4826347I need to display a different home page in US compared to the one designed for Europe (especially UK). Is this possible to achieve in PHP? The PHP website that I have developed uses JS, Ajax and Bootstrap extensively.

0
Q: os.system(<command>) execution through Python :: Limitations?

shamohitI'm writing a python (ver 2.7) script to automate the set of commands in this Getting Started example for INOTOOL. Problem: When I run this entire script, I repeatedly encounter these errors: Current Directory is not empty No project is found in this directory No project is found in this d...

1
Q: Parse request response for key, value pairs

Malvin9000Python newbie here, not having any luck Googling a solution for which I'm sure is a trivial problem... I'm storing the response from a POST request to Instagram's API into a text file. What's contained in this response is HTML, which includes an access token I'd like to dig out. The reason it's ...

0
Q: Spark Streaming in Java - Eclipse console doesn't display the output

SuriI am quite new to Spark development. Pardon my ignorance. I am trying to get this test program to work in eclipse that listen to the port "9999" on the local I am running using netcat. I don't see the word count ouput on the eclipse console. Here's the code. Appreciate your help. import org.apa...

0
Q: How can I open a link in my mobile app that will open in Safari after I've already used javascript to keep all links in the native window?

Andrea GrewellI'm making an HTML/CSS app that's downloaded on an iPad Mini. It's a simple 30+ page site with text and images. I used this javascript to make all my href's open inside the app: $(document).ready(function(){ if (("standalone" in window.navigator) && window.navigator.standalone) { // For iOS Ap...

0
Q: Strange Behaviour on Git Pull - Error Local Changes.. Would Be Overwritten by Merge

Will BeauchampI make some changes then run the usual commands: git add -u git commit -m 'some changes' git pull Then, I get the error in the title; when I run git status I see many new changes not staged for commit. Then I have to add the changes (which I didn't make and only appeared after the failed pull)...

0
Q: Android OpenGL: DrawElements for large, complex 3d objects

brohan322In an app I am currently working on on Android, OpenGL 3.0, I have a complex, large object with about 80000-90000 vertices and hundreds of thousands of triangles. This object exists along with a lot of other, significantly smaller and less complex objects. With 80000-90000 vertices, I had to us...

0
Q: mysql Dealing with variable key that can change

user2586851I ran into a problem. I store 3 values. The UUID of a player, the name of the player and the amount of coins of each player. Every player can change their name when they are offline. However, if a player comes back, I have to register the NEW name of the player, keep the UUID and most important, ...

0
Q: rating code for website in asp.net. i want to rate my page with stars

Aayush Khandelwali am designing a website in asp.net. i wish to include a rating system in every webpage. i wish to put 5 unrated stars and the user will rate the page according to his desire. How to do?

0
Q: How to read data from Google Cloud Storage based on its blobkey?

LA_Early I saved data to blobstore with Files API usage and then read it with the following code: resource = blob_key blob_info = blobstore.BlobInfo.get(resource) if blob_info: self.send_blob(blob_info) else: self.response.write('Blob entry not found') The documentation says that in many ...

0
Q: C# Data type for Birthdate

Casey CrookstonThere is no Date type. If I want an object that is only a date with no time, like a birthdate, what type would I use? I'm sure this question has been asked and answered already, but I'm not finding this exact question, only lots about date and datetime in general. Thanks!

-1
Q: Android - My application always crashes

ZgrKARALARI cant understand why and i cant find where is the problem. My LogCat log is 07-08 20:01:09.396: I/Choreographer(10872): Skipped 46 frames! The application may be doing too much work on its main thread. 07-08 20:01:10.566: E/WindowManager(10872): Activity com.interrail.railrehber.MainActivity ...

1
Q: How to automate my three bash scripts?

bjornasmI have a large number of files, and each file is going to be decoded, sorted/minimized and then put in a database. Each of those operations have its own bash script. The files are sorted into daily files, which are is in their consecutively monthly folders. The problem is that there is only one d...

0
Q: Bochs not accepting "flat" as a usable geometry

Ender ScytheI'm making an OS: ORG 0x7C00 BITS 16 cli hlt times 510 - ($-$$) db 0 dw 0xAA55 I then assembled it into a bin, put it into an image file (mode: flat), and started to test it with Bochs, when I tested it with the mode flat, it said ata0-0: specified geometry doesn't fit on disk image I th...

0
Q: Reload entire page without refreshing once with javascript

calsparkHow do I silently reload the current page(the body or all of it) without refreshing? I only want to reload the page once in a callback javascript function. This is because some data has changed.

0
Q: SQL returning an error when passed from PHP

Eli Daviesso I have a bit of a complicated problem. I'm also new to PHP and SQL, but: I have an HTML page that takes a PIN number, uses JS to send that number to PHP, which is then supposed to look up some text from a database that has already been created and send it back to the JavaScript. The SQL is re...

0
Q: How to convert JSON into textoutput without the attributes

NewbienI am trying to log messages in the "output.txt" which are more readable. So if my input data is like {"attr1":"val1","attr2":"val2"} I want to write it in the log as: val1 | val2 (without attr1 , attr2 like a string) Basically converting data from JSON to a readable format. What should I be ...

0
Q: Activity Not opennig from ListActivity

Shubhang KhattarI am new to android development and i am following video tutorials from new boston. So as per tutorial I created a new List Activity so that You can open the new activity from that list. But when i select an option from list activity its doing nothing in the emulator. Here is My XML file <?xm...

0
Q: Laravel 5.1 adldap - Can't access user properties

Brock B.I'm trying to setup Active Directory authentication in Laravel 5.1, which I was able to get authenticating successfully using this package. The problem I'm encountering is that I cannot access any of the user properties or groups for the logged in user. The documentation for the package isn't ve...

0
Q: How to put security on solr 5

HAnI am quit new to solr 5 and running it through windows7. I would able to index some files and search through /browse on other computers as well. what I am trying to do is putting security on solr because other computer could access to do admin page. 1. How can I limit the access to the admin page...

0
Q: How to create a custom UI for android and desktop java

Rattata 2meim trying to make a cross-platform game using java. I hope it to be completly compatible with android and desktop. I think the best option is creating a "master" library project and then the one for android and for desktop. This works for logic and I can create a bitmap and a BufferedImage that s...

0
Q: Data motion in Cassandra and Spark

user3239018When designing a distributed storage and analytics architecture, is it a common usage pattern to run an analytics engine on the same machine as the data nodes? Specifically, would it make sense to run Spark/Storm directly on Cassandra/HDFS nodes? I know that MapReduce on HDFS has this sort of us...

0
Q: How do you sum a range in a sheet using vba.

DeanHow do you sum a range in a sheet using vba. I tried many different things but I can't figure it out. Thank you. Sheet3.Sum...

0
Q: Run specific project within solution in VS 2013

kdbanmanI'm very inexperienced with Visual Studio. I'm exploring the EmguCV example solution (see screencap below). It has many subprojects. I opened the HelloWorld project and clicked Start from the toolbar. The program ran and I closed it. I'm assuming this set it as the "default" project, becau...

0
Q: How do I run a stored procedure in WinForms?

AustinI am using winforms in C# to launch a procedure that is stored in my MS SQL Server database. I only have one variable and it is @XmlStr. I have a text box that is going to include the variable and a button I want to start the procedure. Can anyone help me do this? I have been researching this all...

0
Q: Get JSON with AngularJS

Daniela Marques de MoraisI trying make a GET request to my API which returns a JSON, but I have a problem when I try get this JSON in my controller. How can I get this response correctly? Controller.js oknok.controller('listagemController', function ($scope, $http) { $scope.init = function () { $http.get("...

0
Q: Qt - How to copy the Qt runtime DLLs to the output path

MitcocI need to copy the qt runtime DLLs libraries to the output path when building. I did a lot of search , I found a lot of topics but none of them helped.

0
Q: Sum of previous rows based on time intervals

AustinI am unable to get the intended result table. I have the following table: I want the result table to have a column of revenue generated 1 YEAR ago for all the orders before that particular product was purchased. This should be based on product table. For example the 1st record has that field ...

0
Q: uninitialized constant SessionsController ROR rails 4

nilkashHi I am beginner to Ruby on rails. I am trying to some experiments. I am trying to implement user login. I am not using any gem. I tried that in following way : get "log_out" => "sessions#destroy", :as => "log_out" get "log_in" => "sessions#new", :as => "log_in" get "sign_up" => "users#new",...

1
Q: How can I scale points in Dygraphs?

Eugene ChoeI am using the great dygraphs package for R (https://rstudio.github.io/dygraphs/) My code as of right now is: james<-mtcars[c("mpg","drat")] james$date<-seq(from=as.Date("2013-05-16"),to=as.Date("2013-06-16"),by="days") x <- xts::xts(james$mpg, order.by = james$date) p <- dygraphs::dygraph(x, ...

0
Q: Customize Devise redirect if already signed_in user tries to sign up again

jamesI feel like this is super easy... I've done very little customization to the default Devise Controllers, the customization in my Registrations#New is designed to ensure certain variables are accessible in the view. I've read the source code, but not sure I'm seeing the line that redirects the us...

0
Q: Use angular to mark modified elements in a list

Peter BurkertI want to synchronize data, therefore I have a data object containing the current state. When this is changed I would like to set an attribute on the object so that I can filter by this when syncing. The object structure is: data = { type1: [ {a:"a", b:"b"},... ] type2: [ {c:"c",...

0
Q: Eclipse - build a project

Gops ABI have a project in the following structure projectName src package1 class1 package2 class2 I have enabled build automatically under project tab. It builds projects successfully and creates class files under bin. If I disable it and do the following, it is ...

0
Q: Which method is best for feature selection in continuous dataset

bhuwanI have continuous data sets and the datasets are of binary class.I have used information gain theory but the total information of my dataset is very low(like 0.017). so while calculating the information gain of each feature i got it also low(0.0119 for x1 feature,0.0102 for x2 feature and 0 for s...

0
Q: LESSHAT and MIXIN in Keyframe-possible?

Florian SchommertzThe following example is using the LESS HAT Mixin Lib 3.0.2 .a { color: blue; } .b { color: green; } .keyframes(~'myanimation,0%{ .a() } 100%{ .b() }'); I'm not quiet sure if the answer here is the best possible solution: CSS Less mixins for keyframes I'm loo...

0
Q: How to hide button in certain scenes in SpriteKit

AdamTommyI'm finishing up a SpriteKit-based app, and just added a button to the main storyboard, and connected it to an IBAction func in the GameViewController. I have multiple scenes within my game, and I only want the button to display in the Game Over scene. Right now it is on the screen throughout all...

0
Q: How to reload messages.en without restarting?

Hoang OngIt seem that messages.en file only reloads when I recompile/restart the app. How can I reload it without restart in Prod mode.

0
Q: Measure GPU load

jocopa3I'm adding OpenCL support to a Java application using LWJGL, and I would like a way to measure GPU usage so that users can monitor their overall system performance. Is there any way this can be accomplished with Java, or will I have to make a native library instead?

-1
Q: IF statement for whether or not my code should be used on a line by line basis?

AustinMy problem is simple, but alluding me all the same. I need to add some php code to my script that will make my script go line by line and only activate upon finding "205" in said line. I am thinking it should be some sort of IF statement, but I lack the expertise to code it. In English, I imagin...

0
Q: UIColectionView overwriting cell label when scrolled off screen and back on

tangobangoI have a test app with a UICollectionView that draws its cells correctly when they first come on screen, but overlays the label text with new text that changes and is placed differently when the cell is scrolled off and back on the screen. Here's how it looks when app opens: Here's how it look...

0
Q: Laravel 5.1 PHPUnit Tests for API using JSON

BakerStreetI just started working with Unit testing in Laravel 5.1 to test an API I'm building, and I can get PHPUnit to work fine with the ExampleTest.php, but when I create my own test, it fails every time. Here is the response for my API endpoint v1/conversations: { "data": [ { "id": 1, ...

0
Q: Polymer wysiwyg and Jquery! How to?

MarcoI want to integrate a wysiwyg editor into my dom-module, but i have not had success until now. The problem is the shadow dom and the jquery plugin. Do you know some tutorials or guides I can reading about this problem ? thank a lot. 

0
Q: Overlap of children in ExpandableListView involuntarily causes checkboxes to check in separate groups

AlleyOOPI am using a Navigation Drawer with an ExpandableListView contained inside. The ExpandableListView has groups with children that have checkboxes next to each child. When certain checks are checked, the checks within a collapsed group below the expanded group are checked as well. Can someone exp...

0
Q: How to execute a function after returning page in flask?

MadRabbitI'm currently trying to use @app.after_request but it doesn't seem to do what I want. This is example of the code I'm using. from flask import Flask from time import sleep app = Flask(__name__) @app.after_request def kuki(r): sleep(5) return r @app.route('/') def hello(): ret...

0
Q: How to append csv files side by side and repeat the same at the end using python?

rami92I have a problem in appending the csv files again. I have to append them side by side for the first set and repeat the same for four sets. With the help of others posts here, I have tried to append them. But they are getting appended at the next line. Please help me in getting through this proble...

0
Q: run php file on button click ajax

michelleEntry level user here. I've seen countless AJAX\PHP examples with data being passed via POST or GET and modified one of their examples. When clicking the button (id="clickMe) I want it to execute advertise.php and nothing more (no variables need to be passed) without refreshing the page and a not...

0
Q: how to use iterate mediator and aggregate mediator in one proxy service

masetti mani kantaInput XML <Haer> <Hello>mani</Hello> <Hello>kishore</Hello> </Haer> ProxyService <inSequence> <iterate expression="//Haer/Hello" attachPath="//Haer" preservePayload="true" sequential="true" continueParent="false"> <target> . . . . </target> <...

-1
Q: Prblem with Function

Tomsz ComaszWhen i put this code in main(), it works correctly. snakeBody snakeTmp; snakePart s1(150,250); snakePart s2(100,250); snakePart s3(50,250); snakeTmp.growUp(&s1); snakeTmp.growUp(&s2); snakeTmp.growUp(&s3); Im trying to create a function(or put in method for snakeBody?), that execute Instruct...

0
Q: SignalR Client - IHubProxy.On<> and Invoke<> accepting an interface

DarrenI am building a windows service that will act as a client to an existing site that's employing SignalR. I have IHubProxy.On<> and IHubProxy.Invoke methods working when passing around concrete classes. For example, this works: hubProxy.On<MigrationRequest>("iSWindowsServiceRequest", request =>...

0
Q: merge of two image coming always top and bottom.but i want side by side in android

Ben TecI have two images that I want to merge into one and show side by side (right and left). I've searched in websites and have gotten the below code, but it always is coming top and bottom only. This occurs due to the extra code I added to make both images the same size. my code: if{ width = c.get...

0
Q: proper use of composer create-project to code and commit on project dependencies

elcodedocleI have a PHP project with some 3rd party developed dependencies and some developed by myself. Some times I happen to find a bug and want to patch it or code some extra functionality that fits the project needs on one of the modules. Right now I am coding on the module project, doing a commit an...

0
Q: Filter based on array of values

Kyle.BelangerI have a select box that is populated using ng-options. $scope.items = [ {ID: '2012', Title: 'Chicago'}, {ID: '2013', Title: 'New York'}, {ID: '2014', Title: 'Washington'}, ]; <select ng-model="selectedItem" ng-options="item.ID as item.Title for item in items | filter:filterItemNames"> <...

0
Q: Rails - param is missing or the value is empty: user

SeattleDucatiI've been developing a site based on the Hartl's guide. I want to move the password reset functionality to it own partial. I created a partial, _passreset.html.erb. Currently, it is an exact copy of _form.html.erb. I plan on editing it to only have the password fields On the Users show.html.er...

0
Q: Using filter on Objects in an Array to find max? [swift]

Kristofer DomanI have a bunch of Objects stored in an Array. They all have the property: distanceInSeconds: Int I was wondering if there's a way to find the max of this property between all objects in the array using filter or another array method? For instance: var distances: [Distance] = [] var maxDi...

0
Q: How to turn a PFFile Array into a UIImage Array?

bantukatanayaI am having some trouble converting a PFFile array (named: activeimageFilearray) into a UIImage array (named: activeImageArray). My current for-in method only appends the first entry of the PFFile rather than appending all the entires in the PFFile array into my new UIImage array. So when i execu...

0
Q: JSON/MySQL 403 Forbidden error.

user3241846Im trying to load data from a mysql database to my website. This is the error im getting Im using only one file for the project and it is a phtml file, dunno if that matters. so all this code is in the same file. I am using the lastest wampserver package version with lastest php and apache ve...

0
Q: Not start a process if Windowtitle already exists

James WolffI have a scheduled task that runs a batch file. My batch file sets the windowtitle to ProcessErrors. This batch file can take some time to complete and I don't want multiple to run at a time. I also do not want to stop the one that is already running as it can cause harm to the process. I wou...

0
Q: Get PropertyInfo[] from a class, leaving out extension method

KKKKKKKKI have an extension method inside a class that allows me to do this: var foo = Class["bar"]; Class["bar"] = foo; Here it is: public object this[string propertyName] { get { return this.GetType().GetProperty(propertyName).GetValue(this, null); } set { this.GetType().GetProperty(propert...

 
5:53 PM
179 messages moved from mooR
 
-1
Q: Trying to declare getInputStream() but it doesn't identify anything

HOomani have a Socket class for an android chatter, i'm Trying to declare getInputStream() in some part but it doesn't identify anything. what's the problem? private class ReceiveConnection extends Thread { Socket clientSocket = null; public ReceiveConnection(Socket socket) { this...

0
Q: tag onclick being processed twice

Matt GI want clicking on an "expando" to toggle between its states: expanded and collapsed. I'm still pretty new to DOM/JS, so my style here is probably awful; If you have any style guidelines let me know, but for right now I want to get the code working. I've tried a few different ways, like setting ...

0
Q: CSV not writing properly after scraping data for a website using Python and BeautifulSoup

Gonzalo68I am having problems writing a CSV file after scraping data from a website. My aim is to scrape a list of names and address of golf courses found in the United States. I used the .get_text(separator=' ') for the address to remove the <Br> to break-up the text for the address but when written to a...

0
Q: Creating a Connector - Query results refreshing in the same page

Renato K.When creating a connector, in 'Recording a query', I follow two steps: 1-Accepted the User Agreement; 2-Executed a query. The result is shown in the same page (without reloading), so import.io does not understand that the query has happened. Any workarounds? Thanks a lot, Renato

0
Q: PowerShell Export-CSV Not Working

MoAI am trying to export some data to an Excel file I'm new to Powershell, and tried putting something together which didn't work. Parent Question is here for more detail about the problem. The script I am using to collect data is below. How can I tweak it so it exports or out-files data to csv ...

0
Q: Error in Avg Function in ms Access SQL

AdarshIn attendance table there is a field TimeIn of the type Date/Time. Some data in that column is 14/03/2015 15:06:45 While some is in the format 15:08:40 Want to find average time the Employee has entered Office. Hence I used the below SQL SELECT AvgTimeIn = CAST(AVG(CAST(TimeIn as FLOAT)...

0
Q: regex in python using OR for single or double quotation marks

user3833361I am trying to write regex in python for either single or double quotation marks from these examples: animal="cat" animal="horse" animal='dog' animal='cow' It comes up empty when trying with | re.compile("animal=\"|'(.+?)\"|'").findall Please help. Thanks

0
Q: WCF connection timeout when trying to connect to an unreachable host

user2715240I set connection timeout the following way: var binding = new NetTcpBinding(SecurityMode.None, true); binding.OpenTimeout = TimeSpan.FromSeconds(5); Then I try to connect to the service like this: var client = new ServiceClient(new InstanceContext(eventClient), binding, address); client.Subsc...

0
Q: Issue Inserting data from php to database

Aidan Francis Boland-LynchI'm having issues inserting data into a database from php (API URL). Below I have a php I believe all the details are correct. First time doing this, so i'm not 100% sure how to debug, the data is not appearing in the table. Some help our tips would be great. <?php $servername = "localhost";...

-1
Q: Generate string of n spaces

karaokyoHow would you create a string of n spaces? The solutions here don't seem to work if the character is a space(" "): Repeat Character N Times Create a string of variable length, filled with a repeated character

0
Q: Angular - same Url "/" but with different templates based on Users logged in status

Austin PerezI am trying to have two different templates. One that is the landing page for logged out users describing about the business and the other dashboard page for if a user is logged in. I read on this other stack on how to do this with UI-router. I would like to know the best practice to do somethin...

-1
Q: Adding Weather Data to iOS App using Swift

htlee15000I want to import weather data into an iOS app through the url of an API I have. How do I do this?

 
12 messages moved from mooR
test
1 message moved from []](chat.meta.stackexchange.com/rooms/895)
test
1 message moved from [] @nicael](chat.meta.stackexchange.com/rooms/895/nicael)
test
1 message moved from @nicael [​](chat.meta.stackexchange.com/rooms/895/nicael-)
test
1 message moved from @nicael [​​](chat.meta.stackexchange.com/rooms/895/nicael-)
um...
 
0
Q: How to limit string variable content to some define no bytes(i.e 6 bytes) after 6 bytes all the content should truncate?

user4950013How to limit string variable content to some define no bytes(i.e 6 bytes) after 6 bytes all the content should get truncate. for example lets say string var="hello world" then o/p should be as "hello" and from 6th position all the content should get deleted. my approach is below but i am not a...

0
Q: JMS MessageDriven bean - how to synchronize threads?

SolanoDespite the fact messagedriven bean is based on asynchronous logic, I have the following scenario: 2 realms containing user credentials (jdbc and ldap) When user put Username and Password at form, it tries to autenticate in both realms (jdbc and ldap) For each realm attempt to login, I send a...

0
Q: Most parallelizable way of getting rid of duplicate elements in a scala vector?

Bolt64Given that I have a vector with a lot of elements, and many of them repeated, and I need to get a vector with all the duplicate elements removed. For now, my implementation involves applying the toSet method and then the toVector method. However, this is rather slow for very large vectors. I was ...

0
Q: Event Delegation: Affecting more elements than it should

LeiaI'm learning event delegation, and I encounter a problem. At first, when I did the first draft, if I clicked in the < span > it would only delete the text and not the button, so I modified it. Later, when clicking the container div it deleted the whole thing, so I changed it again. Right now it...

0
Q: Parse rest call getting data from array of pointers

Josh CarterIn on of my Parse tables I have an array of pointers to another table. I want to get all of the data from the objects being pointed to with a rest call. I was able to use this on columns that contain only a single pointer, but I don't know how to handle an array. Thanks for any help! import json...

0
Q: Generate random number/text in logstash

user3366706Is there any inbuilt way to generate random text (of certain length) or number (of certain range) in logstash input/filer plugins? or should we write one in ruby.

 
test
← *1 message moved from @nicael test
1 message moved from @nicael [test](/)](chat.meta.stackexchange.com/rooms/895/nicael-test)
test
← 1 message moved from nowhere
 
0
Q: youtube api TopicId translating?

Kevin ChoiSo I have topicIds for a video [u'/m/0lbxz:/m/04rlf', u'/m/06m6j', u'/m/017bqr', u'/m/05r5c']. I am trying to translate the list into something like [people, children...] Is there an API call that takes in a topicID and returns the pertaining topic?

0
Q: Regular Expression: Replace multiple input fields with their values.

CiprianI want to use regular expressions to replace input tags with their corresponding values. The search must include the name of the input, since I have multiple inputs in the same form that need replacing. For example, I need the following string: <input value="Your Name" name="custom_field__29...

-2
Q: python changing variable for some reason

RobWhen I compute my standard error of the mean, if I include it on a single line with multiple variables it comes out divided by ten. I was wondering if anyone had some insight into why it would do this. My code is this: mean, sem, z = get_mean(sample), get_sem(sample), scs.norm.ppf(confidence) ...

0
Q: Populating ViewModel from EntityModel and Vice Versa in a controller

Adnan YaseenI have started working with MVC for sometime now and I am learning different approached to different scenarios. There can be different ways of handling a single scenario and it can be quite debatable that which one is more effective and better then other. My confusion is related to the use of E...

0
Q: Cannot scroll dropdown list of AutoCompleteTextView on Android

kaolickI have an AutoCompleteTextViewon an AlertDialog. The dropdown list with the suggestions gets partly covert by the keyboard (see screenshot). The result is that I cannot scroll the list. I already managed to move the dialog to the top of the screen to get more space. When I set android:dropDown...

0
Q: How can I generate all possible sorted arrays from alternate elements of two sorted arrays?

John LuiI recently encountered this question in an interview. I wasn't really able to come up with an answer to this. I started with, take first element from first array, and then find how many elements are greater than this element in the other array. But then, I mean, I don't know, couldn't really form...

0
Q: MySQL IN with subquery performance weird behaviour

elbuildI'm experiencing a weird beahviour on a REST api endpoint. Basically I have two tables, a user table with an id and other relavant fields, and an action table with a uid (which maps the user ids) and several other fields. I want to extract the user that has performed a particular action and I'm ...

0
Q: Why isn't my try/catch block catching System.AggregateException?

jkj2000I have some code that makes an asynchronous http call like so: try { var myHttpClient = new HttpClient(); var uri = "http://myendpoint.com"; HttpResponseMessage response = client.GetAsync(uri).Result; } catch (Exception ex) { Console.WriteLine("an error occurred"); } Most of the time ...

0
Q: Div Flex Item scrolls to top after an other flex item changes size in Chrome

l4z6_zLike in the title described i have a flex Layout on my website. I have a menubar on the left which you can hide. Over css-transistions this does look smooth. The Problem is the div right of it. Because of the flex layout it has to resize when I hide the menubar. The div is scrollable. Now if I ...

0
Q: Vlookup Multiple Sheets

kimberly TrevinoI trying to use a table on Sheet 3 as a reference for Sheet 1. The formula I'm using is =VLOOKUP(N1,Sheet3!A1:B15428,2,FALSE). This works for a single cell,but I cannot copy the formula to other cells in the same column. Every time I try Excel gives me an #N/A error. I do not want to manually ad...

0
Q: Using an array of pointers?

FlowerWhen I compile this code as it is. I get this error....."variable-sized object 'word_list' may not be initialized char *word_list[i] = malloc(sizeof(char) * STRING_LENGTH );" I know on line 13 my variable "word_list" is just a pointer to characters and that it is causing the problem. I have t...

0
Q: jQuery Autocomplete source dependent from different input

CozyCodeThe solution for only 2 options is posted here @VinayC : jQuery UI - Autocomplete source dependent from selected option in different input But I need a solution for more than two options in my select? The code is here: http://jsbin.com/fakuwohupa/edit?html,js,output <select id="country"> <...

0
Q: How can i do that with listview using javafx?

Juniorz GeekzI use javafx and scenebuilder, already have the list with the elements but now I need to display the image and the labels something like that http://i.imgur.com/Htrgbv7.png?1 this is my code i dont know if is the correct form. public void displayBuddyList() { Roster roster = connecti...

0
Q: d3 bubble chart how to render each nested level

metalaureateI'm confused by the d3 bubble chart example. Why does this d3 example http://bl.ocks.org/mbostock/4063269 not render the parent and super-parent levels as bubbles? (e.g., 'analytics' and 'cluster'). I would like to render a hierarchical dataset as bubble chart such that the parent level names ...

0
Q: File permission in var/www/html/index.html?

JaquackyI'm running Ubuntu 14.04 and I'm trying 2 get apache2 working. I've just installed apache2 and want to edit var/www/html/index.html however it says I do not have permission to edit or delete. I tried doing sudo chmod 755 index.html and it has given me permissions but the file still doesn't allow ...

0
Q: grouped barplots in R

SsankI have a dataframe data in R which looks like construct category count 0 insert 327 1 insert 320 2 insert 311 3 insert 309 4 insert 297 0 rev_insert 216 1 rev_insert 214 2 rev_insert 211 3 rev_insert...

0
Q: Strange behavior when passing a variable into a function in C

RebeccaK375I created a hash table: typedef struct _linked_list_{ struct _linked_list_ *next; char *disk_name; struct disk *disk_object; } linked_list; typedef struct _hash_table_ { int size; linked_list **table; } hash_table; Where each entry of the hash table is a linked list. Then...

0
Q: Durandal Jquery plugin only loaded on first page load

Pietro CoelhoI have created a carousel plugin that works just fine: define([], function() { $.fn.carousel = function(opts) { var settings = $.extend({ next_selector: ".control-next", prev_selector: ".control-prev", slideName: ".slide", indicators: ".slider-balls li", ...

0
Q: Troubles between GAE and GCE with mongodb Failed Connection

Luis ArismendiI am writting because I have a trouble connecting from App Engine (with PHP) to MongoDB (In Compute Engine), enable PHP.ini in the project with extend="mongo.so" but I show the follow error: Fatal error: Uncaught exception 'MongoConnectionException' with message 'MongoClient::__construct(): php_...

0
Q: Windows Phone cant create a switch

Ziomek I have this error and I cant find out what is going on. The first sentense means something like "Error occurred while creating virtual switch ethernet network" And the second one: "Making the switch failed" What should i do? Thanks for answers

0
Q: Rolling median for a large dataset - python

AlexI have a huge file with 200K lines, I need to find out the rolling median by counting distinct words in each line. I have implemented my own solution using Heaps and also I tried calculating median using numpy array where after reading each line i add number of unique words in that line into the...

0
Q: I want to post json as a string or file on url while opening the same url

GodfreyAs my heading suggests, i need to do both at the same time to achieve my goals. Post JSON to a url while opening the same url. They cannot be two separate actions. I have snippets of how to do both but i am looking for one elegant way. My example is probably wrong. Any help. url = 'example.com/t...

0
Q: update values of a particular coloumn when a checkbox value is changed

jayI have a grid view with 32 columns which each have check boxes. The 1st column is for usernames and I need a functionality in such a way that when an user checks or unchecks a particular checkbox of a particular column and clicks on a "save" button, the data of that particular column in the datab...

0
Q: Invoking controller action on dropdownlist change

Abu Hamzahthe below code works but but the problem with this code is that every time it onchange event fired it looses the session/viewbag data to null and I'm looking into a different approach where I should be able to invoke on when the user change anything in the dropdownlist and also pass the value to ...

0
Q: Integration testing for reading a file

Ingrid MorstradI want to make sure that my C# program reads a file as expected. How should I test this? I am assuming I just call my function (which accesses the file system) and see the output when a file exist and when it doesn't. Should I instead abstract the file system out? Should I even bother testing th...

0
Q: How can I develop a message wall in ASP.NET?

qchen01I need to create a Team function in my portal, which include a message wall feature. This message wall will be similar as Facebook message wall, but simpler, which will allow: 1. All team member can post message; 2. All message can be viewed by all team member; 3. Refresh speed will be close to r...

0
Q: Error with ADODB Conn and Recordsets

Mike ViscontiniI am getting this error: " Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source." when tring to open a record set. I have read that setting 'nocount on' on the stored procedure I was using would remedy this, but it did not. So, hopefully you ...

0
Q: SQL Query Distinct two fields Max(date) and retrieve ID

greenpuffI'm having trouble figuring out how to make this query work. I've tried everything under the sun to avoid looping. The table has ID (pk), UserID, BookID, BookDate (datetime), and SellerID. There are duplicate cominbatins of UserID and BookID. I am trying to retrieve distinct records by UserI...

0
Q: How to influence a bash while loop with a timed global variable?

Serge StroobandtI have a while loop in a bash script which should do something different at the beginning and every 5 seconds. Any previous loop is allowed to complete. The 5s interval is indicated by the do_different global variable set by the heartbeat function. An additional complication is that a normal whil...

0
Q: How to create search button in visual studio

DanuI already create a form for searching data and fill it in datagridview tools. Then I wanna create a button for searching data by idmember. Here screenshot my form: Here my code for searching: Sub CariData() With Cari Try 'Dim cari As Integer sql = "SELEC...

0
Q: Some way to load geoJson faster in google maps API

nickforallI have a big geojson file for a layer in my project, it has over 16000 lines in it. For people with a normal pc, it will take for about 10 to 20 seconds to load, and on some computers it won't even load because the browser reports it is crashing. Is there any way to load it asynchronously, so the...

1
Q: BrowserSync not working with Windows 10

AdrianRatajczakI've got this gulpfile.js (below) on my Windows 10 machine. On Windows 7 everything was fine. Everything I installed few hours ealier. UAC is disabled, When I'm starting without admin right I got this error. When using admin rights Browser Sync is starting forever. Also I installed Visual St...

0
Q: Why menu items show in bottom left button menu instead of action bar overflow top right menu?

Stephane EybertI have a toolbar menu with two items that should appear in the overflow menu as per http://developer.android.com/training/basics/actionbar/adding-buttons.html But these two appear in the bottom left button menu. I'm using the following API levels: <uses-sdk android:minSdkVersion="14" a...

0
Q: set ip address insite JTextField in JAVA

Yuvi1I have this simple GUI in JAVA and i want to put inside the JTextField a string that contains the IP of my local machine. I tried to get the ip with this command : InetAddress.getLocalHost().getHostAddress(); and to store it inside a string , and to put the string inside the JTextField i have ...

-3
Q: how to copy a file from current folder to another folder in C#

soheil yoHow can I copy test.pdf from current folder to C:exfolder I know the siple copy way in C# But I want the code which works for any folders which the exe file in in it

0
Q: error log for changing background image script, Google Chrome

dSumner.1289I'm having trouble getting my background-changing script to work in Google Chrome. I'm developing a custom WordPress theme, I've used the following jQuery, and it doesn't seem to do anything except for add my first class in. When I inspect element and look at the source, it's throwing the error "...

0
Q: MS Word Find with regular expressions, repeated PATTERNS

JJEIII have a document with labeled (and some unlabeled!) paragraphs: 1.0 ... ... 2.4.3 ... ... 6.18.21.8 ... Etc. I need to find all those labels, and only those labels (regardless of what the paragraph content is and what other text may be present, e.g. unlabeled paragraphs/text). The expected d...

1
Q: Bootstrap Modal Pass Variable Between Functions

thekeegsI've got a variable modal that uses different content depending on which link is clicked (Bootstrap Reference). I've got it working no problem to open the modal with a different heading depending on which link was clicked to open it. The problem: I have a large function that as the end result it ...

0
Q: Libgdx stage buttons touch event at wrong position

StefanI got a problem with my libgdx stage buttons. My game is running in 16/9 with a FitViewport. But I'm trying to make my HUD responsive to multiple screen aspect ratio's. For example I want my pause button instead of this (its still drawing in the fitviewport wich is set to 16/9): http://i.stack....

0
Q: New sections do not show up in my UITableView after the first new section (Swift)

Jonathan Allen GrantThis may be a little complex. I am adding rows into a UITableView based off of events that I create. Each event has a start time. I use this start time to create sections. To illustrate, if I have three events: one starting at 8:00am, one starting at 12:00pm, and the third starting at 8:00am, t...

0
Q: NLog Doesn't Write Log Entries Into Database

Miha<?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- See http://nlog-project.org/wiki/Configuration_file for information on customizing logging rules and outputs. --> <tar...

1
Q: Transpose to excel from JSON how to round up?

Emiliano Herediai have the excel script and the jason page, to not make this huge im just going to place the important things. function pull(toonName,toonRealm) { if(!toonName || !toonRealm) { return "" } var toonJSON = UrlFetchApp.fetch("us.battle.net/api/wow/character/"+toonRealm+"/"+toonName+"?fie...

0
Q: How do I create a comma-separated list with "and" before the last item in Objective C, in particular?

Ben C. R. Leggiero I've looked into Objective-C Simplest way to create comma separated string from an array of objects and they don't mention this nice part of human readability. I want to write a method that provides a human-readable string representation of arrays, with comma-spaces when necessary (incl. the...

0
Q: Executing Apex using Force.com CLI

WillI am trying to pull some data from SalesForce using the Force.com CLI. I don't know Apex as well as Java, so I am following this tutorial to get things going. HelloWorld.apex : global class HelloWorld { public String hello() { return 'Hello World!'; } } HelloWorldTest.apex : @isTest...

0
Q: ORMLite Foreighn field class does not have id field

user3278616I've seen the same exact errors on other questions about this problem but no matter how much I try to satisfy the exception, I can't seem to solve the problem! Here are my two models: public class Outer { @DatabaseField(id = true, canBeNull = false, columnName = "id") private int id; ...

0
Q: Designing two tables in MySQL to use in JPA

java developerI would like to design two tables as follows, my question is, if this design is correct. table tweet: tweet_id,... tweet table needs 0..* hashtags -> table hashtags : hashtag_id,tweet_id,hashtag I would like to use them in JPA, so i think that I will need primary key for both of the tables. Th...

0
Q: Why ternary operator does not support blocks in c?

Insane CoderWhy the ternary operator does not have blocks? In other words, why the following code does not work and reports error for {} braces? int main() { int i = 1; (i==1)?{printf("Hello\n")}:{printf("World\n")}; return 0; }

0
Q: C# Timer inside a property

SantoshI'm trying to implement a timer for a checkbox. The binding for the checkbox is done using the CaptureColorBind property. When ever I click the capture color checkbox (captureColor = true), it needs to be checked for 5 seconds and then checkbox needs to be unchecked. I'm trying to print the date...

0
Q: Merging two RDDs based on common key and then outputting

JamesI'm fairly new to Scala and Spark and functional programming in general, so forgive me if this is a pretty basic question. I'm merging two CSV files, so I got a lot of inspiration from this: Merge the intersection of two CSV files with Scala although that is just Scala code and I wanted to writ...

0
Q: OpenPyxl Adding Data from different rows into a single series? (Python)

rernI am building a parser and I want to graph data from multiple rows that all refer to the same series. row1: Happiness Data - 34 - 55534- 345 - 6456 row2: Sadness Data - 1 - 3 - 55 - 685 . . . row345: Happiness Data - 34 - 55534- 345 - 6456 row346: Sadness Data - 1 - 3 - 55 - 685 Here I only ha...

0
Q: WebHookIt development -- Y! Pipes extension and replacement

luneartSo Y!Pipes is shutting down, no real alternatives exist, especially none quite similar to Y!Pipes. WebHookIt seems like a potentially good alternative, keeping the simplicity of Y!Pipes' interface, and quite a potential to do what Y!Pipes does, and more: open-source, javascript generator (allowi...

0
Q: Custom order for movie sessions

zolterclass Movie < ActiveRecord::Base has_many :sessions end Session has start_at attribute. For example: 2015-07-08 11:50 2015-07-08 16:50 2015-07-08 14:20 2015-07-08 21:50 2015-07-08 19:20 2015-07-08 02:45 2015-07-08 00:20 And I want to print it in this order: 11:50, 14:20, 16:50,...

0
Q: Mercurial:cannot commit because of a strange reason

getsugaI use Ubuntu 14.04 and when I type the command on my directoy hg commit hello.txt I get this .So cannot enter anything and also cannot save.I have no clue what is going on.What is the fix.And what is the meaning of number which is displayed just after the command (like 336,215).

0
Q: Can't build app with Ionic

user3583688I am no longer able to build my app and generate an apk anymore because an error shows up. Here is what happens when I try to build the app in the command prompt: Command Prompt Can somebody please help me with this? Oh and this is what happens if I type ionic info in the command prompt: Your e...

0
Q: How can add div with class to category widget of wordpress

shashikantI want to create a category widget with following code <div class="eco_footer_content"> <ul> <li><a href="category.html">Blogroll</a> </li> <li><a href="category.html">Featured</a> </li> <li>

0
Q: jquery ui - sortable: get new position of all elements

blacksunshineI am using jQuery UI - Sortable on following List: <div class="contentEntries"> <div class="contentEntry">...</div> <div class="contentEntry">...</div> <div class="contentEntry">...</div> <div class="contentEntry">...</div> </div> In the .contentEntry there is an input field with the position: <

0
Q: SQL Server Pivot Table with multiple column with dates

user5094620I have a PIVOT situation. Source table columns: Title Description Datetime RecordsCount A California 2015-07-08 10:44:39.040 5 A California 2015-07-08 12:44:39.040 6 A California 2015-05-08 15:44:39.040 3 B Florida 201...

-1
Q: floating type conversion and get hash code in c#

scottm361in .net: float d1 = n; double d2 = (double)d1; does d1.GetHashCode() equal d2.GetHashCode() for any 32 bit float n? and does the same relationship hold with double and decimal, and with float to decimal? Would this same relationship hold for all integer conversions?

0
Q: Enlarge pictures in sidebar to full page (fancybox)

RobinhoI'm trying to make an photoalbum where visitors can enlarge pictures from a sidebar to full page using fancybox. The mainpage is named index.php and has 2 mainframes. The right frame is named sidebar.php and contains serveral pictures. An example is shown below: By clicking on a picture in the ...

0
Q: Running Selenium with IE11 for several minutes results in the browser freezing

BMadWhen running several tests synchronously using Selenium with IE, after about 10 minutes the browser starts to freeze. The browser will not render pages properly or respond at all. I can only diagnose that when these symptoms occur, the Memory reaches about 1.7G and hovers around there. I use Capy...

0
Q: Setting ng-model value dynamically to the value of js variable in AngularJS

Abhishek BansalSimilar questions have bee asked before and I have tried solutions given to them, but my problem is little different. Lets say I have an array of objects like this in my controller $scope.objArray = [ { id:1, name:"placeholder1" }, { id:2, name:"placeholder2" } ]; now...

0
Q: Fix ZOrder/clipping of process-isolated (via MAF) WPF controls

AnthonyI have a wpf application which hosts a group of controls which are backed by another process via MAF. For some reason, these controls have a clipping / Z order issue that non-remoted controls don't seem to exhibit. The gridview in the above image is one of those hosted controls, and improperly...

0
Q: Git - how to delete files from a folder without deleting the folder?

Ariel Einfeldi'm trying to delete files within a folder in git using git bash and its not working properly. i want to delete all files within a folder without deleting the folder itself and doing all of this from out side of the folder.

0
Q: Python Error ValueError: View function did not return a response

Jean EduardoMy application when it runs the url http://localhost:81/ip_update/00178r it of the error ValueError: View function did not return a response. I am unable to solve, if anyone can help me I will be very grateful def ip_update (client): ip = request.remote_addr if 'r' in client: cus...

0
Q: execute tcl commands line by line

IngoI have a file like this: set position {0.50 0.50} set visibility false set text {ID: {entity.id}\n Value: {entity.contour_val}} And I want to do something similar to source, but I want to use a file handle only. My current attempt looks like this: proc readArray {fileHandle arra...

0
Q: Gmail API returning non-existent threads

johncorserI am using the gmail API to list threads, and I'm finding that some of the items that come back from users_threads->list cannot be found using users_threads->get. These items also cannot be seen via gmail's web UI. I am using gmail's api explorer (https://developers.google.com/gmail/api/v1/refer...

0
Q: Code in IntelliJ IDEA marked with compiler error where it works fine in Eclipse

agent154I'm trying to setup my IntelliJ workspace to do development on an eclipse project. One of the things I've run into is rather confusing: Error:(24, 8) java: SomeClass.java:24: getHeader(java.lang.String) in org.springframework.mock.web.MockHttpServletResponse cannot implement getHeader(java.lang....

0
Q: Zone file format and layout

Dallas PhillipsSo I have obtained an access account with VeriSign to receive .com and .net zone files. At the beginning of the file there are lines like this: ELIMMANNA NS DNS2.SUPREMEDNS.COM. From my understanding the first column is the name of the actual domain name, the second stands for NAME SERVER and t...

0
Q: option tag wouldn't get appended in select tag when using Bootstrap's list-group css class

Salmane Boudraa/webresources/university/autocomplete (JSON webservice): [{"fullName":"FACULTÉ DES SCIENCES TECHNIQUES DE TANGER","id":1,"name":"FST TANGER"},{"fullName":"ECOLE NATIONALE DES SCIENCES APPLIQUÉES DE TÉTOUAN","id":2,"name":"ENSA TETOUAN"}] <script> $.ajax({ url: '/webresources/...

0
Q: Rails 4 - Vendor Asset Pipeline

Mateus VitaliI searched on google but only found subject on rails 3, and documentation of the rails 4 saw that project/vendor/assets is not recommended. my html page will use many plugins, and are separated by folders, and within each folder has .js, .css, .png will be impossible to separate each file (js, ...

0
Q: Constructor being called multiple times

Abhay SharmaI wrote the following c++ code trying to understand copy elision in c++. #include <iostream> using namespace std; class B { int a; public: int k; B(int x ) //default constructor { cout << "Constructor called" << endl; } B(const B &b) //copy constructor { cout << "...

 
6:36 PM
test
 
0
Q: How can I get MATLAB to numerically solve a particularly nasty system of equations?

Max LiptonI have four parameters, t1,t2, theta1, and theta2. I want to find a solution (there can potentially be infinitely many) to the following system of equations: t1*cos(theta1) + t2*cos(theta2) + 2*t1*t2*sin(theta1 + theta2) = t1*sin(theta1) + t2*sin(theta2) + 2*t1*t2*cos(theta1 + theta2) + 1 t1*co...

0
Q: constructing a skew symmetric matrix

ManiI am trying to construct a skew symmetric matrix. I can print the negatives but I am unable to print the diagonal to be 0. Where am I incorrect logically? public void constructSkewSymmetric() { for(int i = 0; i < matrix.length; i++){ for(int j = 0; j < matrix.length; j++){ ...

0
Q: Query regarding instantiating of interfaces

icantcodeI have a query regarding interfaces to confirm. Interface interface= new Class1(); //class implementing the interface This creates an object of class Class1 and is pointed by the reference variable interface. However I was learning selenium and found that Alert alert= driver.switchto().alert...

0
Q: correct usage when using OR, AND in a select statement

hocuspocus31What's the correct usage when using OR in a select statement? I have 3 columns that I want to use to filter the a search result: Employee, Department, Date_Hired The query is a simple select SELECT Col1, Col2, Col3,.... FROM table Where Employee = "" OR Department = "" OR Date_Hired BETWEEN ""...

0
Q: if statement multiple selectors and variable

YourConscioussetInterval(function(){ var $thumbone = $("#t1"); if($thumbone.is(":hover")) || $('.thumba').is(":hover") { The above doesn't work, I want to do an if statement checking if a selector turned into a variable is hover as well as a plain selector. Sample. <div id="t1">yadaya</div> <div ...

0
Q: Awesomium freezing/not responding when injecting javascript

thomasxd24Hello so i have a little problem with the awesomium, well it worked before but it freezed when i was trying to inject javascript into the webpage. So here is the code injecting it: private async void PassProduct(DataTable dt) { progressBar1.Maximum = dt.Rows.Count; foreach (DataRow row i...

0
Q: Can I draw a line across a page?

GeekOnGirlSo I'm trying to build a chart of sorts, and I'm trying to draw multiple lines on top of a div, without displacing it. I want something sort of like this: My current script is basically this: http://jsfiddle.net/geekongirl/sguhyuv6/1/ <!--html--><div id="flowsheet"> <div class="flowsheet...

0
Q: Github Windows: New branch created from command line not showing up on github.com

user3472810I created 2 new branches using the command line, and when I use the command 'git branch' I can see all of my branches in the window, but when I used the command 'git push' I get a message that says, "nothing to commit, working directory clean' and so I'm not seeing my new branches on github.com. ...

0
Q: Adding multiple custom bar buttons to custom nav bar

dperkI need to add two bar button items to each end of my custom navigation bar in Swift. I'm using the following method, and although I get no errors, nothing at all is appearing. I'm using my own custom icons, which do appear when I add them using interface builder. Obviously, I can only add one to ...

0
Q: Hiding/showing prev/sibling div with changed state

user3408559I have a container with two divs like so: <div> <div> doing stuff <%= link_to '<i class="fa fa-caret-down"></i>'.html_safe, '#', onclick: "$(this).closest('.preview').hide().siblings().show();" %> </div> <div> doing stuff <%= link_to '<i class="fa fa-caret-up"></i>'.ht...

0
Q: uitableview = nill, fatal error : unexpectedly found nil while unwrapping an Optional value

indoubtfxI got an error in self.tableView.reloadData(). Can it be because i using SSASideMenu lib where is no segues between menu and another views? It seems to me what my tableview not initialized... Sorry for my bad english :( class GroupListViewController: UIViewController, UITableViewDataSource, UITa...

0
Q: Possible to implement a conditional join clause - JOIN ON condition1 OR condition2?

HoppeIs it possible to implement a conditional join clause in Entity Framework 6? Specifically, INNER JOIN ON (boolean condition1) OR (boolean condition2). The code below works, but calls the database twice. Is it possible to consolidate it down into one call? There is a foreign key relationship tha...

0
Q: Find id by pattern (Without jquery or 3rd party libraries)

user2924127I have a button: <button id="btn:1:uniquenamehere">btn</button> the number in the middle sometimes changes due to other frameworks internal workings. I need to be able to find this button no matter the number in the middle. So I need to find it by pattern where only the middle number will chan...

0
Q: Does a parameterized return type require a generic method signature?

kdbanmanSpecifically, I'm working with EmguCV's Image type. I've defined an interface ITransformation with a method ApplyFrom that takes an Image and returns an Image: public interface ITransformation { Image<TColor, TDepth> ApplyFrom<TColor, TDepth>(Image<TColor, TDepth> sourceImage); } But this...

1
Q: Using Boost in a DLL project (ActiveX)

xkmI'm trying to use Boost.Asio on a ActiveX DLL project using Visual Studio 2013. Not sure what is wrong but when building these error shows up: Error 34 error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" ...

0
Q: Multiple HTTP and HTTPS services using WCF on IIS

DinozorI want to figure out how to host my WCF Application project with multiple HTTP and HTTPS services on IIS. What I have now: WCF Application solution created using Visual Studio with two different services (IService1.cs/Service1.svc and IService2.cs/Service2.svc). First service1 should always use ...

0
Q: Android database update records

JJkkIn a table of my database, I have 7 records. Now I want to update the records through a WHERE clause. First, count the records, according to a clause int pos = 0; String SQL = "SELECT COUNT(posizione) FROM operatori WHERE posizione>0;"; final Cursor cur = db2.rawQuery(SQL, null); while (cur.move...

0
Q: Why json_data.getString doesn't encode json string ? or its wrong?

MoudizI have the below error. I know I have to encode the result from string 07-08 21:26:51.348: E/2(22265): <!-- End Of Analytics Code --> 07-08 21:26:51.353: E/Fail 3(22265): org.json.JSONException: Value 1 of type java.lang.String cannot be converted to JSONObject I though the below will convert...

-2
Q: Store different types in ArrayList

Matthias Graham SlickI want to store elements in a list, each elements having 4 parameters I'm trying to create an array list that stores for each element the 4 parameters , which are of different types: iD: int x position : float y position : float name : string I use: ArrayList<String> activList ; Bu...

-3
Q: Python equivalent code for curl

VeeraIn curl i do use like this curl "https://api.boldchat.com/aid/$accountId/data/rest/json/v1/getInactiveChats?FromDate=2015-06-03T17:26:37.047Z&ToDate=2015-06-03T17:27:31.767Z&auth=$authHash&FolderID=880095707209529050" Here authhash is a token which is generated and will be active for 5 mins. ...

0
Q: Avoiding using $el to get input's text?

MiloI have a Marionette ItemView which is a search bar. When the input's text changes, I trigger an event. When that event's handler is invoked, it gets the text via $el: this.getView().on('search:changed', function(arg) { // arg.view; // The view instance //arg.model; // The vie...

0
Q: .load() [from second page] function work, but dont load jquery from second page

Sebastian Manuellii've got a problem. I have two pages.In page1 i have div#content. In this content i load text from page2 with a function .load() [no matter the CSS now],but the jQuery for page2 is not working on content loaded from page2 to page1 (jQuery is linked in every page).Thanks to all for any idea / solu...

0
Q: Where am I going wrong in this python code for CLRS exercise 2.1-4

teamathematicSo the problem is: "Consider a problem of adding two n-bit binary integers, stored in two n-element arrays A and B. The sum of the two integers should be stored in binary form in an (n+1)-element array C. State the problem formally and write pseudocode for adding the two integers." and my python...

1
Q: webview not download file from servlet response

Akram SuryaI want download a file with webview when i click of button on page servlet post data and request url is like website.com/download.htm this url response contain file url as attachment but nothing is happen and i see response in chrome remote debugging tools and response is follow:Response Headers ...

1
Q: Calling on apps like whatsapp viber works on which protocol?

Ishaan BassiDoes the calling on apps like whatsapp, viber works on VoIP protocol or some other because I am thinking of making an app which could connect devices connected to same wifi and make calls to each other?

posted on July 08, 2015 by ChrisD

Suppose I have the following class. When I iterate through the object attributes I want their types to be maintained, but the type is being changed to 'str'. How can I enforce this? class Foo(object): def __init__(self): self._my_list = [1,2,3] self._my_int = 1 def iterate(self): for attr, value in self.__dict__.iteritems():

0
Q: How to join previous row to each row on multiple columns match in MySQL

BubrakI'd like to have one SQL statement in which I'll get for each row the first previous row (previous because of ID, datetime or anything else) which match on multiple columns. Any ideas or I have to use DB+app combination? example table: id,col1,col2,col3 1,1,2,3 2,1,2,4 3,1,2,5 4,2,2,1 result ...

0
Q: Configuration to an binding using soap 1.2 in a WCF Project to be consumed for a non C# client

djski have study and read about it a little, but i can't do this yet so i post this question. Here is my binding configuration: <bindings> <customBinding> <binding name="httpSoap12"> <textMessageEncoding messageVersion="Soap12"/> <httpTransport /> </binding>...

0
Q: Excel One-to-Many Table, Query Number of Rows Per ID

user1403777I have a one-to-many table in Excel, set up as shown in the picture. Each rid (ID) has many samples; each sample has a fixed number of properties (visit, visit type, etc). I also have a pivot table set up to visualize the data: Now, I need to filter/query my data to find all the IDs that hav...

0
Q: Sourcetree: Discard changes with git revert is not working

SoldierCorpI have a big issue with my bitbucket repository because unexpectedly some changes that I never made is showing in my working copy so I pushed them but now the pictures are not in the repository, is like the file is there but broken because is not showing anything and is very weird. I did a git ...

0
Q: How to identify sites using semantic web schemas?

legelI'm developing a semantic web search engine based on schema.org. My problem is figuring out how to efficiently index which websites use a particular schema - e.g. FoodEstablishment. The goal is to identify/develop a mapping of domains to schemas, such that the description for a particular schem...

-1
Q: PayPal Transfer

Max OakesHow can you transfer money to a PayPal account from an external website as I'm building a remittance system but I need to know how my clients can transfer money to a PayPal account for it to work.

0
Q: Fit image onto one PDF page using Migradoc

bordeoI am able to easily add an image to a section in the pdf file with Migradoc. However, the image is cut in half by the page width. Is there a way to force the picture to resize so that it completely fits on one page? Or must this be done manually? If it has to be done manually, does anyone kn...

-1
Q: Obtaining a value of one key based on another key

Akshay GupteHere is the sample json file that i have [ { "user_id":"NSD3JB_20140905205450_1", "group":"passenger", "ip":"172.27.4.50", "mac":"00:11:22:33:44:55" }, { "user_id":"NSD3JB_20140905205450_2", "group":"passenger", "ip":"172.27.4.51", "mac":"00:11:22:33:44:66" } ] Now I need to fin...

2
Q: Transitive Dependency not working and android project wont run aftre being converted to maven

RadixI am trying to use maven dependency management in my android project. I am using the below Eclipse Mars with ADT and M2Eclipse m2e-android plugin 1.6 maven 2.2.1 Mac OSX 10.10.4 I have a classes.jar package which i convert into a maven artifact using mvn clean org.apache.maven.plugins:maven...

 

« first day (616 days earlier)      last day (458 days later) »