John John

27851 questions
1

votes
1

answer
40

views

Which is the prime module for creating a form in drupal?

What is the best module to use for Drupal? I just go through Web forms and also Entity forms modules. As with everything in Drupal, there are Pros and Cons to using these modules also, so I was just wondering when to use these modules? Anybody have any better suggestions?
Jetson John
1

votes
1

answer
990

views

DropDownListFor<> not using my selected value if I change it in the model before call

Why does DropDownListFor not always set the selected value? In my case I've noticed this to happen when the dropdown list is being constructed after a form post and the value differs from the value that was submitted. So the scenario is a form containing a dropdown to select a category you want to s...
John Freebs
1

votes
3

answer
5.4k

views

convert a row of a data frame to a simple vector in R

I have a huge data frame from which I only select a couple of rows. Then I remove some of the columns based on a condition. let us say that I choose row 4460 as shown bellow: V1870 V107 V1315 V1867 V1544 V1207 V1252 V1765 V342 V429 V1826 V865 V1374 4460 0 0 3 0 5 0 2 0...
John
1

votes
2

answer
2.9k

views

Cannot upload file

I have problems to upload a file: Here is my html: 'display:inline; margin-top:-10px' %> 'btn btn-sm btn-info' %> First i tried to simply upload it and to handle it in my controller like this: def import widgets = DBF::Table.new(params[:file], nil, 'cp1252') w = widgets.find(6) p = Patient.new p.vor...
John Smith
1

votes
1

answer
2.5k

views

Primefaces Editor and ajax submission on blur

I have a Primefaces editor on my page and I want to submit the content to the server when the user focuses on a different component on the page. This works find for example with p:inputText, but with the editor I get this error: Unable to attach to non-ClientBehaviorHolder parent I also tried addin...
John Smith
1

votes
1

answer
1.4k

views

How to determine if a Storyboard is animating

I'm trying to develop an application that starts a Storyboard only if it's not animating. Is there a way to determine if the Storyboard is animating or not?
John Kilar
0

votes
2

answer
17

views

How to turn a <nav> with lists into a dropdown menu

I am having trouble turning my nav into a drop down menu. I have tried many ways, yet I am not able to turn my nav into a drop down menu. I don't understand what I am doing wrong. The solutions I am trying look like the guides I tried following. To no luck. Here is my code. HTML Menu Fighting Kites...
John Doee
1

votes
2

answer
477

views

How to display cross reference values using Entity Framework and view models

A very newbie question about MVC and Entity Framework (using data driven development). I built an EF model off an existing database. I used the EF wizard/tool in Visual Studio, pointed it to my database, and it created all the entity classes and relationships. Assume it is simple database that has...
John Lee
1

votes
1

answer
1.6k

views

List All Text Files in a Directory with more than 100 Lines using PowerShell

Hello I'm PowerShell beginner. I'm looking for a script which finds and list all text files in a directory (*.TXT) with more than 100 lines. This code show max and min number of lines in a directory but doesn't list files with min or max number of lines. dir . -filter "*.txt" -Recurse -name | foreac...
john
1

votes
1

answer
198

views

How to configure PyCharm for automatic code completion without ^space?

When typing in PyCharm, I used to automatically get code-completion suggestions without having to hit CTRL+Space. I must have accidentally (not sure how) changed my configuration to disable this, because now I have to hit CTRL+Space to see the suggestion list. Example: Before, when trying to import...
John Worrall
1

votes
1

answer
688

views

How to structure account balance system

This is more of a theoretical question on how to structure a user accounting balance architecture. For the stack we are probably going to use Symfony with Doctrine, but I don't think that the language is most relevant. The problem: We need to create and maintain a usage balance for each user for ou...
John
1

votes
0

answer
5

views

Download Large PDF Files (Bigger Than 150 MB) With Crystal Report

I have .net mvc project. This web project has a screen which can download report file with specified credentials. This screen use Crystal Report. User specifies inputs and then click the download button after that stored procedure is executed to fetch data. User can download pdf files which's size...
John
1

votes
2

answer
48

views

jQuery command other than appendTo

I am trying to clear an LI tag's previous data. Is there another command that will work other than appendTo? Here is what my code currently looks like: var obj = JSON.parse(data); $.each(obj, function(index, item) { $(''). text(item.datestamp+' - '+item.comment). appendTo($('#pCodeComment')); }); I...
John Beasley
1

votes
1

answer
1.9k

views

Translate authorized curl -u post request with JSON data to RestTemplate equivalent

I am using github api to create repositories using curl command as shown below and it works fine. curl -i -u "username:password" -d '{ "name": "TestSystem", "auto_init": true, "private": true, "gitignore_template": "nanoc" }' https://github.host.com/api/v3/orgs/Tester/repos Now I need to execute th...
john
1

votes
2

answer
66

views

Populating an array using range)Cells

I get a Run-Time error 1004 if I run the sub with the commented out lines active. It runs fine as is, but I need to increment the array to read more data in another loop. I'd prefer to use the Range(Cells option. Option Explicit Dim myarray As Variant 'There are 6 numbers stored in a1 to a6 on shee...
John Barnes
0

votes
1

answer
11

views

Python - Manual - libary installation Failure on Windows with Spacy, Thinc and msgpack-numpy python 3.7

All, I am pursuing a path of manual installation of python libraries, one that unfortunately, I cannot deviate from and it has become challenging because some of the libraries are just not easily found from pypi.org. This is a Windows 10 set up using Anaconda for python 3.7 My goal is to install...
John Vaughan
1

votes
4

answer
989

views

sql query builder for select in c#

In my application, I want to build sql query to get result set and export to excel. In my page I need to specify the criteria and the columns which are needed to show in excel. I have gone through this post. In that we can select the required columns and can write where clause, and select from multi...
Jiju John
1

votes
4

answer
93

views

dynamically change an element's class name and have it immediately change the page's appearance

How do I dynamically change an element's class name and have it immediately change the page's appearance Before I present the code snippets, the problem is that the section with id="shutterWrapper" stays hidden and the section with id="noshutterWrapper" stays visible. with this in my .css file: .sho...
John Love
1

votes
1

answer
88

views

Is a CUDA kernel that contains __syncthreads() further limited in its block size?

Must a kernel that contains __syncthreads() have all its threads running concurrently at the time of the sync? If that is the case, how is it possible to use a larger block size than the number of concurrent threads?
John
1

votes
4

answer
281

views

How can I prevent my UDP keepalive from using 100% CPU?

I have a Runnable that watches for data to send out UDP as well as to send a keep alive every 10 seconds. The process is taking 100% CPU. I tried setting the thread to low priority but didn't seem to make any difference. private Runnable keepAliveRunnable = new Runnable() { long nextSend = 0; byte[]...
John Smith
1

votes
2

answer
457

views

Fatal error: Call to a member function IPP() on a non-object in QuickBooks/IPP/Service.php on line 417

I downloaded https://github.com/consolibyte/quickbooks-php to a php server. Then I filled out docs/partner_platform/example_app_ipp_v3/config.php with the developer keys and put in a mysql database credential. As soon as I ran the docs/partner_platform/example_app_ipp_v3/example_customer_add.php s...
John
1

votes
1

answer
480

views

How do I end UILongPressGestureRecognizer with an animation?

I've animated a UIImageView with a UILongPressGestureRecognizer like so: override func viewDidAppear(animated: Bool) { var longPress = UILongPressGestureRecognizer(target: self, action: Selector("longPress")) imageView.addGestureRecognizer(longPress) imageView.userInteractionEnabled = true } func lo...
John Jackson
1

votes
1

answer
330

views

Why can't I import this Haskell module/package?

I installed the SourceGraph package using cabal: cabal install SourceGraph It was installed perfectly without any errors. Now, I've created a file called Test.hs to test if I am able to import this package and use it. These are the contents of Test.hs: module Test where import SourceGraph main = p...
John Red
0

votes
2

answer
28

views

unsupported operand type(s) for &: 'str' and 'Timestamp'

Statement : df[df['Symbol'] =="TLT" & df['Date'].max()] Error : unsupported operand type(s) for &: 'str' and 'Timestamp' My pandas dataframe is df. It consists of a trading log. When I filter the df on Symbol and(&) timestamp I get the above error What did I do incorrectly ? I don't want to change...
John John
1

votes
2

answer
327

views

Global variable security implications

I have Global Variable in my application. This is something I don't want to store, but which the user should be able to access whilst the app is running. All works. My question is, what security implications does using a global variable have? Is it accessible from other apps?
John
1

votes
1

answer
22

views

Assign a integer value to character

what is the best method to take a user input of a character and convert this to a specific number? Then store this number to an array. I have a bit of code that I have re-written multiple times and so far have not been able to get it to work. printf("Row: "); scanf("%d",&fire[0]); fire[0]--; I would...
John Lucey
0

votes
1

answer
13

views

Finding rows that have the same foreign key and members of the set satisfy a condition

There are two tables, user and user_set. Both of these tables use the column id as their primary key. user has the column user_set_id as a foreign key to indicate which user set it belongs to. user table: id | user_set_id | name | active | no_in_set ------+--------------+----------+...
John
1

votes
1

answer
588

views

Passing 2d std::array to function cpp

I am trying to write a function in c++ that will take 2 input std::arrays, and return an array of the products via matrix multiplication. However, the function cannot take an array with different dimensions (ex. 4x4 works, 3x4 does not) here is the code: #include #include template void dot(std:...
John Doe
1

votes
2

answer
715

views

How to make concurrent hash map thread safe with get and put as an atomic operation?

Is my below method thread safe? This method is in Singleton class. private static final Map holder = new ConcurrentHashMap(); public BoundStatement getStatement(String cql) { Session session = TestUtils.getInstance().getSession(); PreparedStatement ps = holder.get(cql); if(ps == null) { // If "ps" i...
john
0

votes
0

answer
8

views

How do I load XML child nodes into MySQL table?

I am using MYSQL to run a webshop, and would like to automate the currency conversion. I have an XML file that contains all the currencies I need and more. For each currency there are several child noes that contain the actual exchange rates. When I use this code: USE Valuta; TRUNCATE TABLE Valuta.V...
John Enger
1

votes
1

answer
314

views

Why my HTC files are not loading in IE quirks mode

I have a large legacy web app that uses HTC behavior in CSS. For example, .tabButtons { BEHAVIOR: url(/Echo/common/behaviors/tabPanel.htc); } This will work in IE 11, but I must go to Compatibility View Settings and add the domain. It is possible to use CSS behavior another way? I tried to put at th...
John Henckel
1

votes
2

answer
934

views

Prevent bypassing powershell execution policy

We have Powershell installed on our RDS environment. It's currently being used for tasks like remote management and App-V virtual application publishing. To my understanding it's fairly easy to bypass a restricted execution policy. I can't however find any useful information on preventing bypassing...
John Dane
1

votes
3

answer
471

views

NSIS Detect running background process

I need the ability to look for another running process that is in the background while my NSIS installer is executing. This other process must be terminated and uninstalled before the new installer is completed. I've tried using the FindProc plugin to find the process and also the KillProc plugin to...
John Murphy
0

votes
2

answer
17

views

How to register modules for advanced functions

When I select Web/Functions in the menu of typo3 cms 9.5.4 backend, I get this error: Advanced functions No modules have been registered. Please contact your system administrator. I am the system administrator. I can't find anywhere how to register modules. How do I register any modules?
John Godfrey
0

votes
0

answer
23

views

Retrieve a Sharepoint List with Angular JS

I have created an Angular JS application which would output a list of data in a Share Point list. I am trying to make a rest API call to my Share Point List to get the data, however I am unable to do it as I get an error 403 Forbidden. Below is my controller which tries to fetch the data. app.contro...
john
5

votes
1

answer
135

views

No styling when converting DOCX into PDF

I am trying to convert a DOCX file to PDF with PHPWord. When I execute the script it looks like that some style elements are not converted. In the DOCX file I have one image, two tables with border 1px and hidden borders and I am using Tabs. When I execute the script I get a PDF file without the ima...
John
0

votes
0

answer
6

views

Group rows of a table that have a common data, in a single row

I have a table in HTML in which I show the sales that are registered in my system. The problem is that if a customer buys, for example 40 items, the table shows me 40 rows with the details of each article. What I need is to group in the same row all the items bought by the customer, in the first row...
John J.
0

votes
0

answer
4

views

Use alternative to .htaccess file if it exists?

Background: I used to use an environment variable to enable me to differentiate between my dev and production server, using this in .htaccess: - # dev server specific stuff here # production server specific stuff here The environment variable "DEV_SERVER" was only ever set on my dev server, and neve...
John A
1

votes
1

answer
43

views

JavaDoc @link package in Android Studio

I need to link to a package in JavaDoc. Example: @param example description (see {@link com.example.packagename this}) With the code above, I get this message: warning - Tag @link: reference not found: com.example.packagename Linking to a class in the same package works fine, but I need to link di...
John_Dark
-1

votes
0

answer
17

views

Custom cast operator for the array of enclosing type

The following resides in the Position class: public static implicit operator Position[](List positions) { //return new Position[] .... } It fires: User-defined conversion must convert to or from enclosing type. Is it possible to define an implicit cast for an array of an owned type, or do you need t...
John Smith

View additional