Jess

0

votes
0

answer
22

views

My datetime field in models.py does not work even though it does not raise any exceptions while migrating

In my models.py I have a field created = models.DateField(auto_now_add=True) which does not raise any problems while migrating and such, however when I save a post, it gives me ValueError at /admin/blog/post/ invalid literal for int() with base 10: b'14 21:27:46.098090' I have went through documenti...
Aleksander Jess
-3

votes
0

answer
17

views

guess a number between 1 and 100

I am thinking of a number from 1 to 100. You and your sibling have gotten into a fight over who gets the last brownie. Write a program that comes up with a secret number between 1 and 100 and prompts each user for an integer. Whatever number is closest to the secret number wins. Be sure that your pr...
jess
1

votes
1

answer
49

views

Getting a value out of an array

If I have an array like the one below what would be the best way to get all of the ListingCategory items out of the array so I can use them in an if statement within a foreach? Array: Array ( [0] => Array ( [ListingId] => SimpleXMLElement Object ([0] => 532712629) [ListingCategory] => SimpleXMLEl...
Jess McKenzie
1

votes
1

answer
186

views

Automatically showing changes without losing focus

I currently have 2 divs that I have to click out of to show any % change. Is there a way that I can adjust the code to show the % change without clicking out of the box? Code: $(document).ready(function () { $('.originalData').change(function () { $('.changedData').val($(this).val()); $('.percentag...
Jess McKenzie
1

votes
3

answer
340

views

MYSQLI Fetch Array

So far I have the code that gives me array(1) { [0]=> object(stdClass)#166 (1) { ["id"]=> string(2) "92" }} the following result but what do I have to do to enable me to use it via mysqli_num_rows? Code: $query = $this->db->query("SELECT `id` FROM $table WHERE $table.id ='$product_id'"); $result = $...
Jess McKenzie
1

votes
1

answer
2.6k

views

serde for simple sequence file in hive

I have a sequence file that has Text key and DoubleWritable value. When I load the file as external table Create external table t (id String, data Double) STORED AS SEQUENCEFILE LOCATION '/output'; It is created successfully. However when I try to view the data with select * statement I get the exc...
Jess
1

votes
2

answer
93

views

swift 1.2 if loop to switch statement

I have the following If-Statment and I was wondering how this could be achieved with a switch statement? I am trying to represent an integer value within an array as a string (e.g. 1 == "Jan") func assigningMonthName([Data]) { for i in dataset.arrayOfDataStructures { if (i.month) == 1 { println("Jan...
Jess Murray
1

votes
1

answer
292

views

What is the exact function of /1 within font: 16px/1?

Could someone please tell what is the function of /1 within font: 16px/1? I have deleted the /1 from the code and there seem to be more space between each line? But what is the exact function of /1 within this context? body { font: 16px/1 'Open Sans', sans-serif; background: #ddd; }
Jess
1

votes
2

answer
1.2k

views

Working out the start and end of a day. Swift

I have a function to work out the start and end of a week which works as expected. I want to implement another function which works out the start and end of a single day. I have the code below however I get the following error: Type of expression is ambiguous without more context. public class Da...
Jess Murray
0

votes
0

answer
9

views

CUDA image does not show output

This is the code to flip image by using CUDA kernel and opencv to read and show image, In main function, the picture of input was shown but the output shows just like black window. By the way, there is no error on the code, it can compile and run. How could I change the code to perform mirror of out...
Jess Brown
0

votes
0

answer
33

views

Change src attribute for a script tag

How could I dynamically change my script tag via jquery? I have tried the following however its not working. var oldSrc = '/blog/blog/wp-includes/js/tinymce/tinymce.min.js?ver=4800-20180716'; var newSrc = '/blog/wp-includes/js/tinymce/tinymce.min.js?ver=4800-20180716'; $('script[src="' + oldSrc + '...
Jess McKenzie
2

votes
1

answer
70

views

Writing to file stops suddenly in Groovy

I am using newWriter() to write to a file from a Groovy script. Everything seems to be going fine, but then the script suddenly stops writing to the file even though print statements show that the script does get through the complete list of objects I'm trying to write out. The file gets to line 4...
Jess
1

votes
1

answer
24

views

Tracking and updating value in a recursive function

Found this code online which can be used to find the maximum value in a tree between two leaf nodes: INT_MIN = -2**32 class Node: def __init__(self, data): self.data = data self.left = None self.right = None def maxPathSumUtil(root, res): if root is None: return 0 if root.left is None and root....
Jess
3

votes
1

answer
3.4k

views

How to add a password to Web.config and encrypt it

I've been all over google, MSDN, and Stack Overflow, but I can't find a full tutorial on how to do this. I want to add a password to my Web.config file for an ASP.NET Web app, and I want to encrypt it. How do I do this?
Jess
1

votes
3

answer
1.3k

views

How to unset session in <script> tag? [closed]

is it possible to unset a $_session in the tag?? i have this script (for the checkout), and after it pop up, and clicked "ok" it will clear my cart using unset($_SESSION['cart']); how can i do that? thanks. echo " alert('Thank You For Ordering! We will Keep in Touch!');window.location='cart.php';";
Jess
2

votes
4

answer
111

views

jQuery Remove Action and Show an Alert

With the HTML below how could I remove the form action and show an alert if the submit button is clicked? HTML: Check Availability
Jess McKenzie
6

votes
2

answer
203

views

Creating the root Vue instance inside of a Vue file

Is there a way for a .vue file to be responsible for creating its own Vue instance in a Single File Component pattern? Here's the Vue File. // MyComponent.vue Hello {{ name }}! const Vue = require('vue'); // what would usually be exports default const componentConfig = { name: "my-component", props:...
Jess
17

votes
3

answer
18.5k

views

A Basic Guide To Starting With Angular JS

I am confused to were to start when creating my app. When I click the add button I am wanting to show a form - Do I append a div to that button? How do I attack this? Code: Birthday Reminders Data Here Add app.initialize();
Jess McKenzie
18

votes
2

answer
1.5k

views

How do I view the source of Markdown files on Github?

Github helpfully renders Markdown (.md) files to HTML when viewing on github.com (for example, this README.md). When viewing any other source file, it is shown as unrendered source code (for example, this .gitignore). A handy feature this gives is linking directly to a line in the source by clicking...
Jess Telford
18

votes
5

answer
99.3k

views

Eclipse won't compile/run java file

I am just trying to compile and run a simple java program. When I go to run my tester class it says select what to run and it gives me Ant Build which when highlighted says "Launches an Ant build with default settings" or Ant Build... that says "Launches an Ant build and allows it to be configured"....
Jess Anastasio
2

votes
2

answer
96

views

Jquery - accessing an element is giving null

I have page a where product and its image are loaded in a table.The image is initially hidden,and onmouseover I want to display the image.The image is inside a div tag,and productname is shown as a link.In the onready function,I attach event handler to the link, $('a').each(function() { if( $(this)....
jess
2

votes
1

answer
91

views

Remove a style used in parent theme

I have a parent theme that calls a function woc_register_cssjs that then uses wp_register_style within it below to do the business then they kick it into action by using add_action('wp_enqueue_scripts', 'woc_register_cssjs'); The location for this document is theme/admin/theme-functions.php What my...
Jess McKenzie
2

votes
2

answer
49

views

How to extract the characters from a string that are inside parentheses?

Picture of the DataFrame: I have one column named contracting and another named contractor inside a DataFrame. I need to divide, for example, the column contractor, into 2 new columns: one column containing the Fiscal number that is inside the parenthesis and another column containing all the rest (...
jess
3

votes
2

answer
398

views

UITableView Deleting Row. Swift 2

I have a table view which is been created programatically based on an array. I have enabled the editing button on the button item and I want to be able to delete the value on the row from the array which, as a result is removed from the table view. I have the following code: class TableViewControll...
Jess Murray
3

votes
1

answer
95

views

Login Redirect to wrong location

When I login instead of being redirected to dashboard I get redirected to / in my auth controller I have commented out the following line however I still get redirected to the wrong location why? I have cleared the cache php artisan cache:clear with no luck Line Commented Out: protected $redirectTo...
Jess McKenzie
5

votes
1

answer
3.1k

views

Aggregation subquery , search inside list of a specific _id

Ater many lectures i canot say if its possible to perform this sql equivalent query in 1 query with mongo : SELECT * from collection WHERE _id NOT IN (SELECT blacklist from collection WHERE _id = 1 ) I tried many thing with aggregatio but didn't manage to work. Here is my collection : { "_id" : 1,...
jess
1

votes
3

answer
4.4k

views

How to use existing database in android? [duplicate]

This question already has an answer here: Simple export and import of a SQLite database on Android 3 answers It is possible to use an already created database sqlite in android? I already created database in sqlite in mozilla ad-ons. How should I use it in my android application? Anyone can help me...
5

votes
5

answer
38.4k

views

PHP Codeigniter: set_value on dropdown menu

I have the following view but how do I apply set_value to it without it defaulting to Please select? Type: Please Select
Jess McKenzie
19

votes
5

answer
19k

views

Encryption compatible between Android and C#

I've found plenty of examples how to do encryption in C#, and a couple for Android, but I'm particularly looking for a way to handle encrypting (using something like AES, TripleDES, etc.) from Android, and eventually wind up being decrypted in C#. I found an example for encoding AES in Android and e...
Jess
19

votes
4

answer
8.1k

views

Overriding default_scope in Rails

In my Post.rb model, I have default_scope :conditions => {:deleted => 'false'} But if I try to run Post.find(:all, :conditions => "deleted='false'"), it won't return anything. It's as if the default_scope takes precedence over everything. I want it so that when I do Post.find() it doesn't return...
Jess
1

votes
2

answer
1.3k

views

JqGrid - clear toolbar filters hitting ESC?

How can I clear all my filters (in JqGrid for PHP) by hitting the key: ESC ?
Jess Stone
4

votes
1

answer
433

views

Codeigniter view function changing to $template

I currently have the following function but I would like to change it into a "template" using the following but I am not sure what the best way to achieve my goal is: The reason behind this is because I need to take advantage of the admin WYSIWYG fragment append_metadata($this->load->view('fragment...
Jess McKenzie
5

votes
3

answer
29k

views

Can't compile/run in Eclipse- Java [closed]

I'm trying to compile and run a simple program in Eclipse and whenever I hit run it says select what to run: and theres the option of two ant builds I have no clue what ant builds are or what to do about that.. when i try to run with the ant build it says "build failed: could not find an ant file to...
Jess Anastasio
2

votes
3

answer
6.2k

views

CodeIgniter: Not showing login error message

Could you please help me work out why my code will not show the setmessage: $this->form_validation->set_message('Sorry %s is not correct.'); The validation is happily showing that they are required: home.php -> controller I have tried the following: $lang['error'] = "Sorry your %s is incorrect.";...
Jess McKenzie
2

votes
3

answer
12k

views

Delete Images -> codeigniter

I have reworded my question to help gain my specific answer, sorry if my last question was confusing: I have an issue with trying to delete a row from the database but also incorporate how to unlink the to images from different locations. I cannot get the row to delete or the images to unlink. He...
Jess McKenzie
2

votes
1

answer
61

views

Stop javascript function on mobiles

I have this JS function which centers everything on the page. This is called at the start of the page and automaticly centers when the window is resized. I need a way to make the function not center anything when the web page is loaded on a mobile device. /** * This method centers a DOM element vert...
Jess
2

votes
1

answer
22.7k

views

BitmapFactory unable to decode stream: java.io.FileNotFoundException in Android

I'm trying to get pictures from my database online, in my "imagelink" which is datafield in my table, I put there the url of the pictures I uploaded, but unfortunately it gives me this error. 02-08 15:05:29.432 14364-14364/com.example.jithea.testlogin E/BitmapFactory﹕ Unable to decode stream: ja...
Jess Ian Sefulan
2

votes
4

answer
794

views

Continue Shopping URI

In my cart I have it so when you add a product you get taken to the shopping cart and the client wishes the user to click continue shopping and be taken back to the added items category for further shopping. How could I do this? The category URI segment is 1 after the domain.
Jess McKenzie
5

votes
3

answer
2k

views

Does ObservableCollection maintain insertion order?

I was wondering if an ObservableCollection is guaranteed to maintain the order of elements inserted into it in C#. I looked at the MSDN site but could not find the answer.
jess
4

votes
1

answer
20.5k

views

Argument 1 passed t be an instance of Illuminate\Http\Request, array given

Why am I getting the following error? Argument 1 passed to App\Http\Controllers\Controller::validate() must be an instance of Illuminate\Http\Request, array given, called in app/Http/Controllers/Admin/Auth/AuthController.php on line 72 and defined Functions: protected function loginValidation($req...
Jess McKenzie

View additional