FAQ Database Discussion Community


Update angular service variable on window resize

javascript,angularjs,resize,angularjs-service
I am trying to update a service variable on resize. The update doesn't seem to be registered by the controller, even though I'm using angular.element to bind the event. The initial setDevice() works, but on resize when I log the Device service on window resize from the controller there is...

Play framework page navigation issues

html,playframework,navigation
I am having an issue with page navigation: When I am on a page such as localhost:9000/data/userX/userhome, and I click the home button on this page, it is going only to one level backward and trying to open localhost:9000/data/userX/index. I have tried different route entries but didn't work....

How to skip reading the timestamp in zabbix?

logging,monitoring,zabbix
I have created a zabbix alert to return log messages whenever there is any ERROR or WARNING in the file : Item : Type : Zabbix agent (active) key : log[/usr/local/panorama/acs/standalone/log/server.log,WARN\s*\[|ERROR\s*\[,,,,\0] Type of information : Log Log Time Format : yyyy-MM-ddThh:mm:ss,SSS And an alert : Name : Error/Warning log at...

How can i loop through values in mysql and use them as i go [closed]

php,mysql
ok so i have a database with emails, i want to loop through emails and send each one an email, i have a select statement that loops through emails but i dont know how to put the emails into my mail function <?php include_once("db.php"); $query = "SELECT email FROM mailer";...

Why can´t I select an element created with a JQuery event (append)? [duplicate]

jquery,html,dom
This question already has an answer here: Event binding on dynamically created elements? 8 answers I wrote somthing like this: <body> <div class="item">An Item</div> <body> I created this with a jQuery event. $("button").click(function(){ $(body).append("<div class="item>An Item</div>"); }); so now i have something like this: <body> <div class="item">An Item</div> <div...

Cannot make non static method - FATAL ERROR

php
I was working on a PHP web application. I used a new datagrid from gurrido.net and it worked well on the local but when I upload it to the server, I get the following error: Fatal error: Cannot make non static method Base::getClassName() static in class Singletons in /var/www/reskb/phpinc/Singletons.class.php on...

What is the equivalent of XML PATH and Stuff in Linq lambda expression (GROUP_CONCAT)?

sql,linq,lambda,substring,for-xml-path
I am having a table like this : EmployeeId EmployeeName ItemName 4 Ganesh Key Board 4 Ganesh Processor 1 Jignesh Key Board 1 Jignesh Mouse 1 Jignesh Processor 3 Rakesh Key Board 2 Tejas Key Board 2 Tejas Mouse 2 Tejas Processor I need to query this as if the...

Does the order of the delegate functions matter in iOS?

ios,objective-c,ios8,delegates
I've integrated the appsflyer sdk within my app. After submitting the app to the appstore there was a problem. I've contacted appsflyer support team and they told me that I should change the order of the delegate functions: in this way - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [AppsFlyerTracker sharedTracker].appsFlyerDevKey =...

Detect an application runs by user click or Windows startup in C#

c#,winforms
I've a C# WinForm application. Currently it runs from a desktop shortcut. But I would like to add it in system startup. User can decide whether it will run on startup or not. If it runs on system startup, I would like to minimize it on system tray, otherwise it...

How to call the website side widget in odoo

javascript,odoo,odoo-8
This is my file which was contain template 'website_fb.fb_shared_post' Qweb.add_template('website_fb_redertemplate.xml'); Below code through create a website side widget so now if call this widget then how to do. I refer the Odoo documentation but nothing to understandable for me so please help me. var RenderTemplate = Widget.extend({ template: 'website_fb.fb_shared_post',...

How to store in Array the parent IDs of elements with the same CLASS and display in alert these stored IDs

javascript,jquery,html,css
I am working on an existing website which limits me to touch HTML code. In the code below, there are 3 rows with the same CLASS (sameRow),.Row numbers may differ from case to case. Inside each row contains DIV with unique ID and a corresponding SELECT element with the same...

Why is JSON payload for int-http:outbound-gateway give 400 Bad Request?

json,rest,http,jackson,spring-integration
Why is JSON payload for int-http:outbound-gateway give 400 Bad Request? Below request works fine on Chrome Rest Client with 3 headers specified in inObjgateway and JSON value of Obj public class Obj { @JsonProperty("phone") private String phoneNo; @JsonProperty("orderNumber") private String orderNmb; } Application Context Code Snippet is <int:gateway id="inObjGateway" service-interface="com.XXX.xx.IObjGateway"...

Automatically Scrolling a webpage with animating div

javascript,jquery,html,css
I am making a web app. I have created 25 divs. I have Used jquery fadeIn() by which divs are gradually made and displayed one after another on screen. But problem is that when 25 divs have been created, scroll is created due to which first 4 divs can be...

Merging 2 fields into 1 from different table in SQL

sql-server
How do I combine into 1 column the 2 fields from different table. I have dbo.Desktop_Info with the field of desktop_info_id & dbo.Laptops_info with the field of laptop_info_id. I want in my view to combine the two fields into 1 including the data. Now, how will I do this? Can...

How to convert a multi-page PDF to images using ImageMagick for PHP?

cakephp,imagemagick
I want to convert the pdf file into images. I am using ImageMagick for image conversion in cakePHP. When I take a PDF with a single page, its gets converted into image but the problem is when I take a PDF with multiple pages, then only the last page of...

NavigationBar buttons not responding on a layout drawn from Service

java,android,android-layout,android-service,android-windowmanager
I am trying to implement an AlertWindow kind of thing where I am using the instance of WindowsManager to add a View on it from a Service. The View is visible and accessible. But the back/home buttons on the on-screen NavigationBar don't seem to respond. I am new to Android....

How to install mysql 5.6 in ubuntu 12.04

mysql,ubuntu-12.04,upgrade,mysql-5.6,mysql-5.5
I was needed to upgrade mysql 5.5 to 5.6, to avoid some issues on importing sql files. ERROR 1293 (HY000) at line 231: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause How do you upgrade it?...

Android : loop through all items in a listview

android,loops,listview,items
Want to get quick answer how to list all items on my listview, in order to print out a list or share to a notepad app etc. That is, to get a variable with following information from the listview: "apple", "banana", "orange". Below is my listview. Thanks String[] values =...

can-model cannot getting data from .json file

javascript,json,requirejs,canjs,canjs-model
I am trying to implement MVC using AMD in canjs. For that I am using requirejs. This is my domains.json file: [ "1":{"uid": "1","urls": "domain1.abc.com"}, "2":{"uid": "2","urls": "domain2.abc.com"}, "3":{"uid": "3","urls": "domain3.abc.com"} ] This is my domainModel: define(['can'], function(can){ SearchModel= can.Model({ id: 'uid', findAll: 'GET /domains.json' },{}) return SearchModel; }) This...

Error when using StanfordCoreNLP

java,stanford-nlp
I'm trying to use Stanford CoreNLP as a library in my java program. I use IntelliJ as the IDE. I was trying to test the library, so I wrote this code: import edu.stanford.nlp.pipeline.StanfordCoreNLP; import java.util.Properties; /** * Created by Benjamin on 15/5/4. */ public class SentimentAnaTest { public static void...

Insertion from and display to a @Html.DropDownListFor() [closed]

asp.net-mvc-4,razor
I am new to MVC 4, I have a view with a form. Many controls are there. One of them is simple Gender with @Html.DropDownListFor(). I have to send value to database and when clicked for edit need to show the same value from database in that dropdown. I am...

Connecting SQLite database in Android

android,database,sqlite,android-studio
I'm trying to create an android app that will read from a existing database table and fetch words. Later I'll show the words on the activity screen. I've saved the database file in ASSETS folder but it's not working. Any help or suggestions will be very much appreciated. This is...

Uploading photo to Facebook using Graph API

java,android,facebook,facebook-graph-api,android-studio
I am developing a simple android app to post to facebook and twitter. So far , i have succeeded in posting simple status updates and tweets. Now i need to post a photo along with the status. I am new to Android development and i am unable to figure out...

Changing HTML codes to HTML through JQuery

javascript,jquery,html,regex
Within my HTML, I have to change a "-" to a carriage return (<br />). I have to achieve that through JQuery. Hence, for my following HTML:- First sentence - Second Sentence I did is :- caption = caption.replace("-", "<br /><br />"); $('.jcarousel-caption').text(caption); Result:- First Sentence &lt;br /&gt;&lt;br /&gt; Second...

R Merge rows in same data frame based on common values

r,merge,group,dplyr
Most of the approaches I've come across involve using dplyr to apply a function when combining features, however, I would just like to restructure a single data frame without applying any function to each group. I have a single data frame that looks like this: gene_name chr nb_pos nb_ref nb_alt...

neo4j optional match and null

neo4j,cypher
Perhaps this approach is wrong but I've built a cypher query using optional matches and collect. If there is data everything is fine, if not, collect returns null for the properties specified. It looks like this is expected as per the docs. Ideally I'd like collect to return an empty...

Yii 2.0 $request->post() issues

php,yii,yii2
In my controller I have the following lines $request = Yii::$app->request; print_r($request->post()); echo "version_no is ".$request->post('version_no',-1); The output is given below Array ( [_csrf] => WnB6REZ6cTAQHD0gAkoQaSsXVxB1Kh5CbAYPDS0wOGodSRANKBImVw== [CreateCourseModel] => Array ( [course_name] => test [course_description] => kjhjk [course_featured_image] => [course_type] => 1 [course_price] => 100 [is_version] => 1 [parent_course] => test...

MATLAB: variable names from array

arrays,matlab,variables
I want to give a number to a variable, such that name of that variable is the ith component of array with variable names. Below is the code I want to run, but I can't. varname = {'test1','test2'}; rangenameraw = {'A','B','C'}; rangenamecolstart = {'1','11'}; rangenameend = {'10', '20'}; for i...

Spring MVC : Unable to get json value in jsp, it's giving 0

java,json,jsp,spring-mvc,modelandview
Need your help. I am not able to get json string in jsp after adding in modelAndView. After debugging, I found it's get added in modelAndView instace. Below is the code snippet: Controller: modelAndView.addObject("json-data",jsonhelper.getJSONString(viewData)); JSP <c:if test="${json-data != null}"> <script type="text/javascript"> window.jsonData =${json-data}; </script> </c:if> Here viewData is the object,...

Which is Better use or don't use string.xml? [duplicate]

android
This question already has an answer here: Why to use strings.xml in Android? 2 answers Commonly android programmer use string.xml because it recommended by ADT android like android studio or eclipse (at least that what I thought) , but lately I think using string.xml is waste of resources ......

How can I set HttpResponseMessage.Content in F#? [duplicate]

.net,f#
This question already has an answer here: F#, assignment operator vs set operator 2 answers As I understand it, it should be possible to set the content of a response message like so: let responseMessage = new HttpResponseMessage(HttpStatusCode.OK) responseMessage.Content = new StringContent("test") However, when doing so I get the...

onclick page goes to top (have to scroll back down to content) [closed]

javascript,jquery
Hi have a page that has some javascript events basically I have the accordion effects in a page with repeating data...It is fine until I get close to the bottom of the screen and expand the page. Next thing I know I am back up towards the top of the...

IndexOutOfBoundException using java.util.Vector

java,arrays,dynamic,vector,indexoutofboundsexception
I have a problem using java.util.Vector and java.util.ArrayList. I know the capacity or better how many elements will be saved within the vector. So i initialized a java.util.List using an implementation of it leveraging the constructor new Vector<?>(int capacity). After the initialisation of the List, I used the method set(index,...

Interacting with a running php process

php
im wondering if theres a way to run a code in a loop as a process and interacting with it from a different script. I know sockets listen to incoming requests but im referring to internal usage, without requests.

Armadillo integer eigen decomposition

c++,matrix,armadillo
I am trying to use Armadillo to decompose a matrix consisting of integers (i.e. arma::Mat<int>) into eigenvalues and eigenvectors However, it always gives me compile error no matter what I put as input matrix and output vector/matrix type It works when i declare the input matrix as arma::Mat<double>, output vector(eigenvalues)...

pandas left join and update existing column

python,pandas
I am new to pandas and can't seem to get this to work with merge function: >>> left >>> right a b c a c d 0 1 4 9 0 1 7 13 1 2 5 10 1 2 8 14 2 3 6 11 2 3 9 15...

Points on the same line

c++,geometry,maps,runtime-error
I was doing a practice question and it was something like this,We are given N pair of coordinates (x,y) and we are given a central point too which is (x0,y0).We were asked to find maximum number of points lying on a line passing from (x0,y0). My approach:- I tried to...

Java Fraction Addition Formula Trouble

java,math,fractions
I have a project for a class where you have to recieve two fractions from a user with different denominators, add them together and output them with the lowest common denominator. Since we have to use principles from only chapters we have covered I cannot make a fraction class so...

How to assign PHP array values as comma seperated string

php,mysql,codeigniter
I have two mysql table, sla and department, I am creating SLA and while creating sla, there is selection of multiple departments, When user submit SLA form, respected departments in department table get sla id, But after adding i need to pull that added SLA with join of departments which...

How can I float two divs left (under each other) and two divs right (under each other)

css
I'm trying this: DIV 1 DIV 3 DIV 2 DIV 4 <div class="div1"></div> <div class="div2"></div> <div class="div3"></div> <div class="div4"></div> I'm trying to use clear:both but it makes a top margin.. Use other divs to float left 1 and 2 and float right 3 and 4 is not an option in...

3 dynamic inline divs not staying in place

html,css,html5,css3
I'm working on a simple 3 div layout. The div's width's are each set to 33.3% and height is set to 100%. What I'd like to have happen is on hover over any of the div's, that div expands to 40% width while the other two each take a 3.5%...

web client in python not working

python,networking,web-client
I wrote a python code that will fetch data from web servers by connecting to port 80 and sending GET http request. But this does no give me the data of the web page instead it gives me a html code saying 'The web page has moved'. Please help me...

Remove duplicate string in java

java,android
I have two different string, let's say: s1 = "hello" s2 = "helloworlde1" I want to get result as worlde1. Can anybody suggest me how to achieve this?...

session needs to be automatically destroyed after redirect if session data is in other language(other than english)

php,codeigniter-2
I am using codeigniter 2.2.1 and i have major issue in session. when i am trying to store session value in chinese or other language session destroy after redirection of page. any one have idea how to handle this error.my website is on 72 languages and i have to store...

View leaderboard for app in Google Play Games

android,google-play-services,google-play-games
I just published in app to the Play Store that uses the Google Play Services API. I setup a leaderboard in my developer console, and can successfully publish scores and display the leaderboard in game (along with everyone else's score in my circles, and the public "all-social" leaderboard). However, when...

Install imap extension for php 5.3.3-7+squeeze17

php,debian,imap,php-extension,apt-get
Server has debian wheezy os installed. Php version is php5.3: [email protected]:~# php -v PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli) (built: Aug 23 2013 15:06:16) I try to install imap extension via apt-get and the result is: [email protected]:~# apt-get install php5-imap=5.3.3-7+squeeze17 Reading package lists... Done Building dependency tree Reading state information... Done...

Exclude class path reference from MANIFEST.MF file

java,maven,jboss7.x,maven-3
I was getting some WARNings while trying to deploy the EARs in JBoss 7.1.1. 15:41:32,028 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry lib/commons-fileupload-1.0.jar in "/C:/myEar.ear/myWar.war" does not point to a valid jar for a Class-Path reference. The issue is clearly explained in this SO thread. I tried removing...

Delete data using modal box in laravel

laravel,controller,routes,delete,modal-dialog
guys. I have some problem to delete data with confirmation (in this case using modal box) in laravel. This is my delete button {{ Form::open(array( 'route' => array('delete_spk', $spk_data->id), 'method' => 'put', 'style' => 'display:inline' )) }} <button class="btn btn-danger btn-line btn-rect" type="submit" data-toggle="modal" data-target="#delSpk" data-title="Delete SPK" data-message='Are you sure...

Xcode 6 - I Can't connect anything from my IB to ViewController.swift

ios,xcode
I can't control-drag anything from my screen to ViewController.swift. This is making me very mad and I don't know how to fix it. I have been looking on the internet for hours and can't seem to make it work.

How should I set my DATABASE_URL?

python,django,postgresql,heroku
I'm working on my first-ever Heroku/Django app. I just want to be sure I'm setting my DATABASE_URL and DATABASES variables correctly. Here's what's in my code: import dj_database_url DATABASE_URL = 'postgresql:///my_app' # Parse database configuration from $DATABASE_URL DATABASES = { 'default': dj_database_url.config(default=DATABASE_URL) } When I just have DATABASES['default'] = dj_database_url.config()...

Instagram access_token returning BadRequest error

ruby,sinatra,instagram,instagram-api
I'm working with the Instagram gem and getting an unexpected bad request error when calling Instagram.user_recent_media. get '/api/photos' do client = Instagram.client(:access_token => session[:access_token]) puts 'access token: ' << session[:access_token].inspect id = params[:id] photos = Instagram.user_recent_media(id, {:max_id => params[:max_id]}) end It's throwing this error: Instagram::BadRequest - GET https://api.instagram.com/v1/users/35099128/media/recent.json?client_id=12345&max_id=: 400: you...

Custom Loader isn't working. Probably an easy fix

android,loader
I'm trying to make a custom loader but it no worky. It's probably an easy fix and I'm just brain farting here. Class to load: public class Exercise{ ... } Loader: public class ExerciseLoader extends AsyncTaskLoader<Exercise> { ... } Fragment: public class DataFragment extends Fragment implements android.support.v4.app.LoaderManager.LoaderCallbacks<Exercise>{ ... @Override public...

Android Studio v1.2.0 start up error : java.lang.NullPointerException

android,android-studio,nullpointerexception
After updating Android Studio to v1.2.0. At start up I get below log and unable to open Android Studio. I am using Windows 7-64bit and look like same error getting in Ubuntu also This issue also reported in Android Issues, but still not solution java.lang.RuntimeException: java.lang.NullPointerException at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:178) at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)...

Time between Vector dates in R

r,date,vector
Given a vector of dates, V.dates, write a function that determines the time, in days, from present day for each element. Next determine the quarter, as defined by 91 day segments, from present day in reverse chronological order. Define quarter '0' to be the time between present day and (present...

External Source Map Tool

javascript,uglifyjs,source-maps
I have a minimized file in production, with a an error handler that logs the errors, as well as the source map that was generated when I minified the file, however I have no way to map the errors to my source file since the errors are in a log...

How to change href link with dropdown value

javascript,jquery,html,hyperlink
I got option values from a query, and i added into dropdown list. here's the code: $(document).ready(function() { $( "#uname" ).focusout(function() { $("#loader").show(); var uname = $( "#uname" ).val(), v_request = $.ajax({ url : "data/get_agent.php", type : "POST", dataType: "json", data : { uname : uname } }); v_request.done(function(data, status,...

composer create-project - command donot work

composer-php,packagist
I have my project on github containing composer.json in the root directory. This is how my composer.json code looks like: { "name": "vendor/projectname", "description": "My first Composer project", "authors": [ { "name": "John Deo", "email": "[email protected]" } ], "prefer-stable": true, "minimum-stability": "dev", "require": { "php": "~5.3" } } I had...

How I can disable not relevant xaml warning

.net,wpf,xaml,resharper
On following XAML code I get warning that some file is missing. <Application.Resources> <!--Global View Model Locator--> <viewModel:ViewModelLocator x:Key="Locator" d:IsDataSource="True" /> </Application.Resources> The warning comes based on this code: if (!File.Exists(filename)) { throw new FileNotFoundException(string.Format("The specified file {0} is missing.", filename)); } Indeed this file is missing but in run...

UIBezierPath - byRoundingCorners - Rect

ios,swift
I have a very easy view controller.. import UIKit class ViewController: UIViewController { let f = TstKocka(frame: CGRectMake(100,100, 150, 150)) override func viewDidLoad() { super.viewDidLoad() view.addSubview(f) } } And I have a UIView class: class TstKocka: UIView { override init(frame: CGRect) { super.init(frame: frame) } required init(coder aDecoder: NSCoder) {...

xargs: exec command with prompt

redirect,zsh,xargs
I'm trying to do the following with xargs pacman -Q | grep xf86-video | awk '{print $1}' | xargs pacman -R to remove all xf86-video-* driver on my machine. To make the question more clear, here is the output of pacman -Q | grep xf86-video | awk '{print $1}': xf86-video-ark...

Loading fact table with SCD type 2 dimension

pentaho,data-warehouse
I have got a dimension tables with 1 million records which is SCD type 2.I am using pentaho Dimension lookup step for populating this dimension table. I am getting a version number,start date and end date. Now I want to populate the fact table based on the scd type2. What...

Sending different objects via ajax with .blur()

javascript,jquery,ajax
I am trying to perform a .blur() that changes parameters depending on which tag loses focus. However, I want to be able to send different objects in the ajax request depending on which id loses focused. Being new to jquery and javascript, I'm not sure how to do this. I...

optimize the implementation of read/write locks

c++,multithreading,boost
I am currently implementing a read/write lock using boost library, without using shared_lock and unique_lock. I have already read some related questions (e.g., How would a readers/writer lock be implemented in C++11?), but I still want to optimize the implementation. Here is my code: enum LockType { NO_LOCK, READ_LOCK, WRITE_LOCK,...

How to pass multiple search parameters in array for searching in php [closed]

php,arrays
Iam writing my code in php and my array looks like this $arr=Array ( [0] => Array ( [Business_name] => 1847(Jumeirah) [Business_id] => 1422 [Business_Locality] => Jumeirah [Locality_id] => 2 ) [1] => Array ( [Business_name] => 1847 Mens Salon(Trade Centre) [Business_id] => 42 [Business_Locality] => Trade Centre [Locality_id] =>...

JSON.stringify versus serialization

json,node.js,serialization
Is JSON.stringify( ) equivalent to serialization or effectively serialization or is it just a necessary step towards serialization? Is JSON.stringify( ) sufficient but not necessary for serialization? Or is necessary but not sufficient? Or is it neither necessary nor sufficient for serialization of JavaScript objects?...

Dealing with Run-time error '9': Subscript out of range when iterating over Worksheet

excel,vba,excel-vba,excel-2010
Not an Excel/VB expert but I keep getting Run time error: 9: Subscript out of range The error is occurring at the For Each line. Not sure why. I'm trying to copy worksheets from one workbook to another workbook. The Workbook strFileName is being open successfully and the workbook does...

Unreal engine - complaints for needing 8 GB of memory even though I have 8GB memory

osx,unreal-engine4
I have a Mac OS X with 8 GB 1600 MHz DDR3 RAM and when I start unreal engine it complaints about Low RAM and asks that for best performance I should have at least 8 GB of RAM. I'm not sure why is this is case, is it possible...

Issues with CDI when injecting generic type : Wildfly 8.2.0.Final

jboss,cdi,wildfly,wildfly-8,weld
We are facing weird injection issues in Widfly due to CDI changes. We have interface public interface Command<I, O> { } and many classes implement this interface like this public class ApproveUserRequests implements Command<ApproveUserRequestsRequest, List<String>> { } Application listener classes likes to get list of all classes available and uses...

Table losing its width on display none/block

css,html5
I am having a tabbed view with a table in each tab. By changin the tab the table is set to display: none. On clicking on the tab again the table will be set to display: block. The problem is on clicking back on the tab, the table loses its...

Restoring instance variables in Android upon activity recreation

android,android-activity,tabs,fragment,recreate
I have an Android project for which I am creating a custom tab view. I have structured the main Activity (FragmentActivity) in such a way that it has a tab bar at the bottom of the screen with a FrameLayout above it. Each option on the tab creates a new...

Dropdown with categories and subcategories

c#,jquery,sql,asp.net
I have 2 tables in SQL. Category_Tbl: ID Categories 1 Projects 2 Residential 3 Commercial SubCategory_Tbl: ID CATID Subcategories 1 1 Residential Projects 2 1 Commercial Projects 3 2 Residential Apartment 4 2 Independent/Builder Floor 5 2 Independent House/Villa 6 2 Residential Land 7 2 Studio Apartment 8 2 Farm...

Issue adding object to HashMap having Object as key [closed]

java
Why is the following code failing with compilation error? class SampleClass{ } public class DemoHashMap { public static void main(String[] args) { SampleClass s1 = new SampleClass(); SampleClass s2 = new SampleClass(); Map<Object, Integer> counts = new HashMap<Object, Integer>(); counts.add(s1, 1); counts.add(s2, 2); } } This code is not allowing...

TFS, disabled user and his pending works

tfs
I have a problem with TFS. TFS users access by windows authority. one user left so his user account was removed or disabled by company IT. but the user has some pending works in TFS. right now the user cannot use, so his checked out works always show 'edit' there....

How to get date six month before current date in single line in Java?

java,jasper-reports
I want to get a date six month before from present date. The code that I tried is: SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); Calendar c = Calendar.getInstance(); c.add(Calendar.MONTH, -6); System.out.println(format.format(c.getTime())); But I want to reduce this to a single line expression which I want to use in my Jasper report...

Famo.us physics engine: forces and walls not behaving as expected

physics,famo.us
I am tyring to create a grid of particles, using the famous physics engine. I thought that if 25 particles were placed beteween 4 bounding walls (forming a square) and they all had an equal repulsion force to each other, they would naturally form a grid - ie. they would...

How can I get the choice “H2” back in the H2 consol?

h2
I accidentally deleted the entries for H2 (Embedded) and H2 (Server) from the H2 console. The dropbox shown below allows you to select the kind of database you want to connect to/create. There is a button that allows you to remove entries, and with it I deleted the ones for...

How can I search JSON with jQuery?

jquery,arrays,json
I'm using a session storage to temporarily hold data and try to search for a string (CatalogNumber) in the session data. If the string isn't existing I'd like to add it. This is what I've tried so far but it's still allowing duplicates. And the search isn't working for the...

How to update already run database migration files using Grails DBMigration plugin?

grails,database-migration,liquibase
I have migration file named test-plugin-migration-1.2.groovy which nedds to be only renamed as migrations listed in it are already run and some other custom migrations. test-plugin-migration-1.2.groovy - > test-plugin-migration-1-2.groovy I tried adding a custom migration for DATABASECHANGELOG table in new file named rename-migration.groovy rename-migration.groovy changeSet(author: "Laxmi Salunkhe", id: "12345-1") {...

Queuing threads in asp.net forms

c#,asp.net,multithreading
So I have a .net forms application which allows users to review a pdf and the click a button which calls a thread and converts the PDF to a JPG file. This works a treat... as long as the button is only clicked once every 5 seconds or so... is...

Is there a Selenium WebDriver available for the Microsoft Edge browser?

selenium,selenium-webdriver,webdriver,microsoft-edge
As of the date of this post the name "Microsoft Edge" has just been officially announced as the default browser for the new Windows 10. It may be premature to ask but I would like to know if a new Selenium WebDriver is available for it and if not, if...

Python: How to combine the results of for loop into one output?

python,for-loop,iteration,output
numbers = [1, 2, 3] for number in numbers: number = number * 2 #For the output I will get: 2 4 6 How do I modify my code so the results can be combined (eg. [2, 4, 6]) without using the print statement? ...

Save excel as pdf changing its orientation to horizontal

excel,vba,excel-vba,pdf,orientation
I have an excel sheet with too many columns, so when I save it as a PDF the file its in too many pages and its not easy to read . I need to save the sheet as pdf but before I want to change its orientation to horizontal so...

How do i send an additional parameter to my MVCGrid.Net RetrieveDataMethod?

mvcgrid,mvcgrid.net
I'm using MVCGrid.net (http://mvcgrid.net). First of all, fantastic grid tool! I have my grid working properly, however when i'm populating my grid I need to pass an additional parameter to my RetrieveDataMethod. The value i need to pass is part of my view model and I'm pretty sure I need...

Dynamic routes in laravel instead of manual routes

php,laravel,model-view-controller,routes
I want to prevent write all route in laravel route.php,actually i follow MVC routing like this www.example.com/controller/action/p1/p2/p3 if you have any good idea give it to me, i wrote this $controller = ucfirst(Request::segment(1)); $controller = $controller . 'Controller'; $result=App::make('indexController')->ChechIfExistController($controller); if($result){ if(Request::segment(2)) $action=Request::segment(2); else $action='index'; if(Request::segment(5))...

Keep Sidebar From Pushing Down Content, Put in Middle on Small Screens

html,css,twitter-bootstrap-3
I'm having trouble with a right-sidebar of varying heights pushing down other content that's on the left, like this: . My main content is in a col-md-9 div, the sidebar is in a col-md-3 div, and comments should be right below the main content in another col-md-9 div. Right now...

maxlength property not working with javafx webview

html,javafx,java-8,maxlength,javafx-webengine
I'm developing an application using Struts2. It works fine in Chrome/IE etc. On JavaFX webview the maxlength property doesn't restrict the user input to the specified amount. Sample code: <s:textfield name = "user_cno" label = "Contact No" id = "idContactNo" class = "inputField" maxlength = "10" /> I've tried changing...

Trapping Object required: '[object]' with MSXML2.ServerXMLHTTP.6.0

xml,asp-classic
I am using the Flickr API and MSXML2.ServerXMLHTTP.6.0 to read the XML response. For example: https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=[mykey]&text=cheese&per_page=1&sort=relevance&min_upload_date=2010-05-25 Returns: <rsp stat="ok"> <photos page="1" pages="847622" perpage="1" total="847622"> <photo id="8658999887" owner="[email protected]" secret="13e2615193" server="8123" farm="9" title="cheeses" ispublic="1" isfriend="0" isfamily="0"/> </photos>...

Will EventKit automatically sync with Google Calendar or Outlook ion iOS

ios,iphone,google-calendar,eventkit
I am trying to build a calendar app and I want the events and reminders could be synced to Google Calendar and Outlook. If I added events only using EventKit SDK, and the Google Calendar account was added. Will the events automatically synced to Google Calendar? Or do I have...

MongoDB: How to find a document by an id inside a nested document

mongodb,mongodb-query,embedded-documents
Given a collection like this:.. [ { "_id" : ObjectId("5546329a470000850084a621"), "name": "Joe", "surname": "Smith", "accounts": [ { "_id" : ObjectId("5546329a470000850084a655"), "default": true, "status" : "approved", "activationTime" : ISODate("2013-05-03T14:37:15.025Z") }, { "_id" : ObjectId("5546329a470000850084a688"), "default": true, "status" : "approved", "activationTime" : ISODate("2014-06-03T14:37:15.025Z") } ] }, { "_id" : ObjectId("9546329a470079850084a622"), "name": "Jimmy",...

Excel VBA find column number of user selected range (by mouse)

excel,vba,excel-vba
I have a script that allows a user to select a column with their mouse. Then, the user selects whether or not that column has a Header. How can I define the column number of the range that is selected so that I can perform functions on it like: usc...

Exctract values from given text in android

android,regex,text
I am trying to extract values from a given text. Here is the text: String 1: $.675.00 was spent on your CAPITAL ONE CREDIT Card ending 2123 on 2015-05-04:15:28:08 at Best Buy String 2: $ 1,310.00 was spent on your Credit Card 5178XXXXXXXX6040 on MAY-04-15 at Amazon Stores. I want...

PHPExcel write rows as is , without any calculation / styling

php,phpexcel
Is there a way to tell PHPExcel to just write rows supplied from an array, without doing any calculation / apply styling / any other thing it does while writing OR when using fromArray ? Need this for performance. $inputFileName = 'client_files/sample.xlsx'; $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); $objPHPExcel->getSheet(0)->setCellValue('D2', '@' . $user ....

Why is there no logs using “docker run image command” to start container?

git,docker,gitlab
I use the docker run genezys/gitlab:7.5.2 command to create and start a container: [[email protected] ~]# docker run genezys/gitlab:7.5.2 /opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system [2015-05-05T05:43:02+00:00] INFO: Forking chef instance to converge... ...... I can see there...

Why am I receiving the error that I am multiplying by non-int type 'float'?

python,integer,numerical,runge-kutta
I am having problems with my code which is a Runge Kutta algorithm to numerically solve for a harmonic oscillator. Unfortunately, I am receiving an error that says I can't multiply sequence by non-int of type float. Considering this code is nearly verbatim from an educational text, I cannot see...

python flask serve several pictures by list

html,python-2.7,flask
Ok, so let's say I use listdir to make an object of pictures, their names, sizes and their file names. The object is parsed so that each file name is item.values()[0]['item']. I am trying to do: {% for item in banners %} <h3>{{item.keys()[0]}} size {{item.values()[0]['size']}}:</h3> <div> <img src="{{url_for( 'static', filename=...

LabView: Boolean Array to Number Block TroubleShooting

arrays,boolean,labview
I am using an EV3 Cube to scan a sheet that represents a binary number; i.e a black line represents a 1 and a white line represents a 0. Using this, I generate a numeric array consisting of 1's and 0's and convert them by using an Index Array to...

Async thread body loop, It just works, but how?

c#,.net,multithreading,asynchronous,async-await
I have just tested something that I was sure would fail miserably, but to my surprise, it worked flawlessly, and proves to myself that I am still quite mystified by how async-await works. I created a thread, passing an async void delegate as the thread's body. Here's an oversimplification of...

Is it possible to edit/customize php code in woocommerce cart and checkout page?

wordpress,woocommerce
Specially wants to change functionality of those pages with custom coding. Example: If any one ask for Buy two and get one free for similar category product, then what would be the best procedure to carry on. With out plugin need solution.

Get nodes BETWEEN two nodes

neo4j
How can I get the nodes on a path of variable length between two nodes, exclusive, in Neo4j? Example N1 -RELATIONSHIP-> N2 -RELATIONSHIP-> N3 -RELATIONSHIP-> N4 I'd like to get N2 and N3 I do not know the length of the path beforehand, I only know the starting node...

How to parse tag in android xml pool parser

android,xml,parsing
I can parse following tags (<item>, <title>), but I can't parse tag with namespace (<yandex:full-text>) namespace is, xmlns:yandex="http://news.yandex.ru". Who know how resolve this problem? Thanks,...