randomuser

1

votes
1

answer
81

views

Maven dependencies in NetBeans

I'm new to Maven and have been trying to use JGraphT as a Maven dependency. But even after installing it locally, the import lines are not recognized. Here are few screen-shots - This is the project window This is the code snippet On running the program I get this message - This is the error message...
RandomUser
1

votes
1

answer
726

views

C# adding properties to already created dynamic object list

I am creating a list like following: var result = data.Select(p => new { p.FirstName, p.LastName, Relationship = p.RelationshipType, p.TierType, Gender = p.GenderType, p.AnnualSalary }); However, I need to add more properties into each of the array item of result like following foreach(var property...
RandomUser
1

votes
0

answer
62

views

Color html tag from url variables

I have url: localhost/x.php?menu=1 when I open subcategories of this menu url changes to url: localhost/x.php?menu=1&submenu=2 open I open again another item it changes to url: localhost/x.php?menu=1&submenu=2&cat=3 I want to color all the selected divs: //menu //submenu with this JQuery I can colo...
RandomUser
1

votes
1

answer
37

views

Work around the SQLite parameter limit in a select query

I have a GUI application with a list of people which contains the person's database id and their attributes. Something like this: +----+------+ | ID | Name | +----+------+ | 1 | John | | 2 | Fred | | 3 | Mary | [...] This list can be filtered, so the amount and type of people depend from time to...
RandomUser
1

votes
1

answer
1.5k

views

Creating a new ruby platform in netbeans

I have ruby installed on my mac machine and netbeans shows that as one of the ruby platforms. I have installed some new gems on my machine with a different GEM_HOME and GEM_PATH locations so that these new gems do not interfere with the gems installed as part of the default ruby installation. Now I...
randomuser
1

votes
1

answer
1.7k

views

Is it possible to use ng-blur and ng-submit together in AngularJS?

I tried to validate two fields with ng-blur and it worked fine.But i need to validate fields both in ng-blur and ng-submit. The validation should work by both in focus and clicking button. Html : Js file : $scope.submit = function(){ // Set the 'submitted' flag to true $scope.submitted = true; // Se...
RandomUser
1

votes
1

answer
1.1k

views

AngularJS ng-click does not work in ng-grid

I am creating an ASP.net MVC application and in that I am displaying ng-grid with a column which has link as cell content. Here's how I achieved it. Controller (ng-grid): columnDefs: [ { field: 'FreightRules', visible: true, cellTemplate: ' ', enableCellEdit: false, enableCellSelection: false }]...
RandomUser
1

votes
1

answer
83

views

File upload using AnguarJS

I wanted to upload image in an AJAX manner and did so with reference to this Article What I have done: Controller: $scope.uploadImage = function () { var result; var formdata = new FormData(); var fileInput = document.getElementById('fileInput'); for (var i = 0; i < fileInput.files.length; i++) { fo...
RandomUser
1

votes
3

answer
331

views

Order by file type in Visual Studio quick switch between tabs window

This might not be a valid question but here it goes. Scenario: I am using Visual Studio 2013. At a given time I have about 15-20 files opened in Visual Studio and switch between them frequently. Difficulty: I am finding it hard to locate a tab/file from the small window when I press Ctrl+Tab since i...
RandomUser
1

votes
1

answer
370

views

Neo4j: Multiple Relationships Merge Issue

I've a neo4j schema in which I've 3 nodes. e.g. p,b,c I want to write a Merge query such that MERGE (p)-[:has_b]->(b), MERGE (p)-[:has_c]->(c1), MERGE (p)-[:has_c]->(c2) where c1 and c2 are instance of c node having different property values. i.e. Merge on all three relationships. If any of 3 merge...
randomuser
1

votes
1

answer
126

views

How can I do SQL Server RegEx replace similar to JavaScript RegEx replace

How can perform below shown JavaScript RegEx replace in SQL Server? var str = '$5,000'; console.log(str.replace(/[$,]/g, '')); Output: 5000
RandomUser
1

votes
1

answer
308

views

How to find middle of string to insert a word

I am trying to write a caesar cipher code, but make it harder than normal. The actual encryption is on a file that is then split into lines. For each line, I want to add a word to the beginning, middle, and end before doing the shift. So far I have this but it isn't working: file = str(input('Enter...
RandomUser
1

votes
3

answer
765

views

Laravel upload images to database

I'm trying upload image: View (part): Countoller: public function store(Request $request){ dump($request->all()); $this->validate($request,[ 'title'=>'required|max:255', // 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'text'=>'required', ]); $imageName = time().'.'.$request->image->get...
randomUser
1

votes
1

answer
120

views

Populate select option from previous select in Laravel

I have this select option and I am trying to populate Submenus which is another select option from the other select option mainmenu in laravel depending on the selection from MainMenu: Main Menu Choose... @foreach ($mainmenus as $mainmenu) {{$mainmenu->Title}} @endforeach I get the values in to...
RandomUser
1

votes
1

answer
42

views

Mysql cross database foreign key

I am trying to create a foreign key between ticket table of task_flow database with user table of sardia database: user_id int(10) UNSIGNED No Id int(10) UNSIGNED No I created the query ALTER TABLE ticket ADD CONSTRAINT fk_u_id FOREIGN KEY (user_id) REFERENCES sardia.user(Id); 'For...
RandomUser
1

votes
2

answer
0

views

How do I collate log files from different processes?

I have a application written in Ruby which generates a log on STDOUT. The application would be running in multiple processes but I need to collate logs generated from each of the process into a single file. Is it possible? I read somewhere that Syslog can be used for this but I am not sure how it c...
randomuser
1

votes
1

answer
2.9k

views

Binding value into TinyMCE <textarea> using AngularJS model

I am developing an ASP.net MVC application with AngularJS and TinyMCE. I need to display a WYSIWYG textarea to the user to get input. I am not able to bind initial value into the textarea. Need help. The following is what I have done. tinyMCE.init({ mode: 'textareas', theme: 'advanced', theme_adva...
RandomUser
1

votes
1

answer
3.8k

views

jQuery trigger reset button click

I need to reset radio buttons and checkboxes within a form via code when needed. I am using an indirect approach, where I have placed a reset button and hidden it using CSS. €1 000 - €5 000 €50 000 - €20 0000 Mobile phones Accessories Then I try to click it like $('#resetFormNew').trigge...
RandomUser
1

votes
1

answer
215

views

Save fb/google profile picture

I'm using django cookie cutter which has pre-installed django-allauth. I've integrated fb and google to login successfully. But I need to save profile picture returned by fb/google in my user model. But I can't find where django-allauth saves data in user model so that I can save profile pic as wel...
randomuser
1

votes
1

answer
180

views

Predefined text in gedit using a bash script

To make my life easier I wanted to write a bash script that takes me to a predefined directory and makes a c file with user given file name. I accomplished this with the following - #!/bin/bash cd ~/cs/graphs gedit $(zenity --entry --title='File Name' --text='Enter file name.').c Now I want gedit to...
RandomUser
1

votes
2

answer
91

views

Why can't generic extension method be called with explicit generic arguments?

I have the following extension method: Module MyModule Public Function MyExtension(Of T)(value As T, i As T) As Short Return Nothing 'omitted' End Function End Module I can call it in a variety of ways: Dim fake As IFoo fake.Bar().MyExtension(1) MyModule.MyExtension(Of Integer)(fake.Bar(), 1) But it...
randomuser
1

votes
1

answer
522

views

c2dm not supported ,any alternative?

According to the message included in c2dm website it seems that cloud to device is not supported anymore. I know that it's clearly specified there but, just to clarify it one more time (cause I really need a new user), is there any possible way to obtain any new senderId/quota to operate with c2dm?
randomuser
1

votes
2

answer
3.2k

views

Polymorphic many-to-many relation

I couldn't get related models in many-to-many polymorphic relation saved into database. $photo = Photo::find(1); $photo->articles()->attach(2); something like this wouldn't work and gives error: Call to undefined method Illuminate\Database\Query\Builder::articles()' How to do it the right way? Mo...
randomUser
1

votes
3

answer
8.7k

views

Loading partial view using AngularJS in asp.net MVC application

I am creating an ASP.net MVC application. I am loading a partial view in a div using jQuery and AngularJS as following: I am doing an ajax call using AngularJS and storing the result as the content in div 'courseList' using jQuery. This happens when the user clicks on links. angular.module('Domain',...
RandomUser
1

votes
1

answer
1.6k

views

how to change the color of PopupMenu background

I am using the following code for creating pop up menu.. i need to change the background color of the menu.. how can i do that. please help. //Creating the instance of PopupMenu PopupMenu popup = new PopupMenu(ctx, holder.ll_overflow); //Inflating the Popup using xml file popup.getMenuInflate...
RandomUser
1

votes
2

answer
370

views

django allauth redirecting to home url

I'm using django 1.8 with python 3.4 I've integrated django allauth using the link : http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/ Now, when I try to open http://127.0.0.1:8000/accounts/login .. It redirects me to http://127.0.0.1:8000/ Any idea, why is this happening?
randomuser
1

votes
2

answer
4k

views

Kendo grid number formatting as percentage issue

I am displaying numeric value formatted as percentage using the following: columns.push( { field: key, hidden: false, format: '{0:p2}' }); When the field is supposed to display 1.00% it's displaying 100.00% like wise any given value it's adding zeros, one more value is 65.37% and output is 6,537.00%...
RandomUser
3

votes
4

answer
154

views

Is there a second success in angular $q.all() as in jQuery $.get()

Looking at the jQuery documentation I found out the following: $.get( 'example.php', function() { alert( 'success' ); }) .done(function() { alert( 'second success' );
RandomUser
17

votes
6

answer
11.2k

views

Skip and return objects from list of object using Lodash/Underscore

I need to perform an operation similar to the following written in C#: int[] items = { 1, 2, 3, 4, 5, 6, 7 }; var a = items.Skip(2).Take(3); Which return 3, 4 and 5 Similarly I need to skip records from a list of object $scope.myObject = [ { Editable: true, Name: 'Daniel Test', Site: 'SE100'}, { Edi...
RandomUser
2

votes
2

answer
91

views

Select distinct values from db

I have two tables user: id, username and app: userid, appid, mainid I want to display users that dont have a record in this table.I get from address mainId and appid.If I run this query SelectQuery('select User.UserName from User INNER JOIN App ON User.Id = App.UserId where App.Mainid!= '.$v...
RandomUser
5

votes
3

answer
687

views

How does je work without cmp?

.L10: leal (%rsi,%rsi,4), %edx movsbl %al,%eax addq $1, %rdi leal -48(%rax,%rdx,2), %esi je .L3 In the above there's only cmp preceding je, how does it work here?
randomuser
2

votes
2

answer
580

views

z-index on fixed header not working

I have tried to replicate the issue in this plunker. .demo-blog.mdl-layout .mdl-layout__content { padding-top: 0px; position: relative; margin-top: -80px; z-index: 100; } header.main-header{ z-index: -50; } I want the div that says 'on the road again' to be on top of the header that says 'evolution...
randomuser
21

votes
1

answer
44.9k

views

curl insecure option

I have a situation where the client makes a call through curl to a https url. The SSL certificate of the https url is self signed and therefore curl cannot do certificate validation and fails. curl provides an option -k/--insecure which disables certificate validation. My question is that on using -...
randomuser
1

votes
1

answer
739

views

Pinning Visual Studio projects to start menu

I am using Windows 7 I have pinned Google Chrome to my start menu and I can see a right arrow near the icon. When hovering on it I can see tasks as new window and new incognito window. Likewise I need to add most commonly worked projects in Visual Studio 2013 to the Visual Studio launcher in Start m...
RandomUser
6

votes
3

answer
7.1k

views

Bitmap from TextView (getDrawingCache) always null

I am trying to extract the bitmap associated to the displayed TextView instance, but it always returns a null value. What Am I doing wrong? Should I use textview.draw(canvas) instead? TextView textview = (TextView) findViewById(R.id.text_title); textview.setDrawingCacheEnabled(true); textview.buildD...
randomuser
12

votes
1

answer
9.4k

views

Amazon Linux vs Red Hat Linux [closed]

I have developed a web service(using ruby/sinatra/sqs) which runs on Linux Red Hat. I am planning to move this on a EC2 instance. I see that Amazon provides a linux version of its own. Is there any reason why I should use Amazon Linux on EC2 instead of Red Hat?
randomuser
3

votes
2

answer
1.9k

views

Regular Expression to deny input of repeated characters

I want a regular expression which allows the uses to enter the following values. Minimum of Four and max of 30 characters and first character should be Upper Case. Eg: John, Smith, Anderson, Emma And I don't want the user to input the following types of values Jooohnnnnnn, Smmmmith, Aaaanderson, Emm...
RandomUser
12

votes
2

answer
41.4k

views

What is the equivalent of viewstate in ASP.net MVC [closed]

In asp.net pages, during postback, ViewState makes the data persistent. What makes the data persistent in ASP.net MVC?
RandomUser
3

votes
4

answer
9.8k

views

AngularJS adding text inside a <div>

In jQuery I can do something like the following to add desired text inside a div or any element. $( '#div1' ).html( 'Hello Again' ); How can I do similar operation using AngularJS. I need to add a plain text inside a div when the user clicks on a link. Here's what I have tried: View: Click Me ng-con...
RandomUser
1

votes
1

answer
186

views

Running StyleCopAnalyzers without building solution

I would like to use StyleCopAnalyzers https://github.com/DotNetAnalyzers/StyleCopAnalyzers to find StyleCop violations in my code. However I can't find the way to run them without building entire solution. Is that even possible?
randomuser

View additional