I'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 ...
I'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...
I 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...
Is 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?
I 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...
My 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...
Okay. 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...
I 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...
I 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...
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...
so 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:)
I 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...
Using 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...
I 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...
I 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...
I'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 ...
I 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!
I 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...
We'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...
First 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 ...
I 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 ...
I 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...
Object 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 ...
What 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)?
I 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...
We'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...
Im 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 ...
I 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?
I 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 {{...
D3 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...
Can 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)
I 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 ...
I 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...
I'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...
Built 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 ...
I 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?
The 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...
MongoDB 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...
I 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...
I 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...
I 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 ...
I 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...
Background 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...
I 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...
I 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...
I 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 ...
I 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...
I 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...
working 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...
I 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...
I 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: [ ...
The 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...
I 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 ...
We 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...
The 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...
I 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...
I'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...
I 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...
I 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...
I'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/...
I'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...
I 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...
so 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...
I 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...
#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...
I 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 ...
I 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].
So 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": { ...
I 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...
Here 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 ...
I 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...
I 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...
Hey 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 ...
I 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...
I 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...
I 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 ...
I 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...
I 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...
HI from the following snippet of JSON: "comments":{ "count":2, "data":[ { "created_time":"1436046658", "text":"Omg!!!! \u00bf!Pediste fondue?!", "from":{ "username":"shanlynch", ...
I 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...
It 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?
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...
I'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...
def 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...
I'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...
How 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.
The 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...
I 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...
I'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...
Aim: 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 ...
Is 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...
I 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...
I'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...
this 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...
I 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
I 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...
I 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...
I 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?
With 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...
I'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...
I 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?
Using 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 ...
I 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...
In 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...
I'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...
This 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...
I 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: ...
I 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...
When 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...
I 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); ...
What 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?
I 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...
May 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...
Can 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); ...
I'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 ...
I 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 ...
I 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...
Recently 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...
I'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(...
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...
I 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...
When 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...
I 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...
I'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.
I'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...
I 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.
I'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...
Python 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 ...
I 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...
I'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...
I 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)...
In 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...
I 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, ...
i 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?
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 ...
There 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!
I 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 ...
I 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...
I'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...
How 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.
so 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...
I 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 ...
I 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...
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...
I 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...
im 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...
When 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...
How 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...
I'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...
I 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...
I 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("...
I 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 ...
Hi 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",...
I 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, ...
I 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...
I 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",...
I 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 ...
I 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...
The 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...
I'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...
It seem that messages.en file only reloads when I recompile/restart the app. How can I reload it without restart in Prod mode.
I'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?
My 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...
I 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...
I 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, ...
I 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.
I 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...
I'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...
I 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...
Entry 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...
Input 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> <...
When 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...
I 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 =>...
I 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...
I 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...
I 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"> <...
I'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...
I 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...
I 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...
Im 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...
I 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...
i 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...
I 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 ...
I 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...
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
I 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 ...
In 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)...
I 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
I 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...
I'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";...
How 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
I 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...
How 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...
Despite 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...
Given 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 ...
I'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...
In 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...
So 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?
I 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...
When 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) ...
I 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...
I 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...
I 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...
I'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 ...
I 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 ...
Like 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 ...
I 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...
When 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...
The 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"> <...
I 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...
I'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 ...
I'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 ...
I 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...
I 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...
I 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", ...
I 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_...
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
I 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...
As 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...
I 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...
the 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 ...
I 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...
I 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...
I 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 ...
I'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...
I 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...
I 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...
I 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...
I'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...
I 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...
I 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 ...
How 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
I'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 "...
I 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...
I'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 ...
I 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....
This 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...
<?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...
i 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...
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...
I 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...
I'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; ...
I 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...
Why 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; }
I'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...
I'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...
I 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...
So 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...
class 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,...
I 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).
I 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...
I 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>
I 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: <
I 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...
in .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?
I'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 ...
When 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...
Similar 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...
I 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...
i'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.
My 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...
I 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...
I 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...
I'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....
So 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...
/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/...
I 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, ...
I 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...
I 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++){ ...
I 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...
What'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 ""...
setInterval(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 ...
Hello 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...
So 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...
I 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. ...
I 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 ...
I 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...
I 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...
Is 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...
I 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...
Specifically, 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...
I'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)" ...
I 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 ...
In 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...
I 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...
I 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...
In 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. ...
I 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...
i'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...
So 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...
I 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 ...
Does 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?
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(): …
I'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 ...
i 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>...
I 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...
I 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 ...
I'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...
How 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.
I 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...
Here 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...
« first day (616 days earlier) ← previous day next day → last day (458 days later) »