2018-10-22         Dean

Transitioning the height of a submenu in CSS and JavaScript

I've created 2 fiddles, clicking on the Products list item makes a submenu appear, I need it to transition however. The only difference between the fiddles is that the 2nd link works like I need it to but with a "hack", tested in firefox and chrome but it didn't work in edge.https://jsfiddle.net/tzswq34a/2/https://jsfiddle.net/tzswq34a/3/The only difference in code is that the second link has the line of code below on line 10 in the Javascript section:$submenu.height();Why does querying the height of the submenu make it work? Unfortunately the CSS Spec currently does NOT...

 javascript                     2 answers                     37 view
 2018-10-22         Dean

how to update database table with listbox values using c#

I'm trying to update a database table with values from listbox as well as textbox values however and exception was thrown Exception. Procedure or function expects parameter, which was not supplied.thrown even after supplying the parameter. I wanted the courses selected to be shown in the same column of database table separated by comma.This is what I have so far. using (SqlCommand com = new SqlCommand("updateStudent", connection)) { com.CommandType = CommandType.StoredProcedure; com.Parameters.AddWithValue("@studentNum", studentNum.Text); com.Parameter...

 c#                     3 answers                     24 view
 2018-10-22         Dean

Get a single value from a nested associative array

For a setup script I write in PHP (for CLI, not web) I use a settings file as well as other other "content" files.The settings file is built up like a regular ini-file[header.subheader.moreheaders...]keyA = valuekeyB = value1|value2|..."header.subheader.moreheaders..." and "keyX" will form a nested associative array with "value" as a string or "value1|value2|..." as a simple array (0-...).Thanks to this accepted answer, I got so far that I can split the headers into a recursive array recursively. So far, so good.However, as the content files shall contain references to the...

 php                     1 answers                     47 view
 2018-10-22         Dean

Facebook JS SDK getLoginStatus inconsistent behaviour

I am adding facebook login to my app, however I encounter issus with one the methods of the SDK - FB.getLoginStatusI have created my own wrapper of the SDK and exposed some of the main methods./*eslint-disable no-undef*/class FacebookSDK{ constructor(options = {}){ this.options = options; } isSdkLoaded(){ return typeof FB !== 'undefined'; } init(){ window.fbAsyncInit = () => { FB.init(this.options); } (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id...

 javascript                     1 answers                     55 view
 2018-10-22         Dean

Remote end closed connection without response chromedriver

I'm using chromedriver on selenium by python scripts.When fire the scripts, Remote end closed connection without response was raised.does anyone solve this?chrome: 55.0.2883.28chromedriver: 2.25 I had issues with connections closing unexpectedly after updating to selenium 3.8.1, using Chrome and Java. I was able to resolve the issue by re-trying the driver setup when it quit unexpectedly. [XXX]

 python                     1 answers                     64 view
 2018-10-22         Dean

Why does my Django request.method is 'GET' not 'POST'?

I met this strange problem when doing a pre-populated form.In my template, the form method is clearly stated as POST:<form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">{% csrf_token %}But in my view function, the request.method turns out to be GET.Below is my view function:def editProfile(request,template_name): theprofile = request.user.profile print theprofile.fullname notificationMSG = '' print request.method if request.method == 'POST': form = UserProfileForm(request.POST,request.FILES, instance=th...

 python                     3 answers                     78 view
 2018-10-22         Dean

Error 400 with ajax request

I am new to web development, and I guess that it is a basic issue, but I couldn't find a solution on the internet.To start, what I am trying to do is to have a script, loaded on a webpage using TamperMonkey, download a xml file located on a php server.The process worked perfectly when I tested it on localhost (using MAMP), but then I put it on a 000webhost server, and it's not working, I get an Error 400 Bad request in the ajax response. I also tried on other web hosting services and I get the same error.On the other hand, the request works perfectly on the 000webhost serve...

 javascript                     1 answers                     29 view
 2018-10-22         Dean

CodeName One, Action event not created normally - need explanation

Good morning, Everyone. I have a simple Hello World application created from basic "Hello World" template.I've added simple button on the main form (in a CodeNameOne GUI designer) and I'm trying to fire an action event by clicking "Action Event". I am saving GUI designer contains before to make an event as it described here - CodeName One, Action event not working- need explanationBut GUI designer ask me to choose some filename instead to simply auto-create an event handler in NetBeans IDE as it shown in every manual. The main problem - I can not to select any file in th...

 events                     1 answers                     97 view
 2018-10-22         Dean

Setting spinners onResume doesn't work

I want to save text from 2 edittexts(et1,et2) and selection from 3 spinners(spinnerm,spinner and spinner2) onPause and setting them back onResume.Text from edittexts is saved correctly, only spinner selection don't work as desired.My code: public void onResume(){ super.onResume(); Log.d("REZUM","notr smo"); SharedPreferences seti = getSharedPreferences( "pavzica", MODE_PRIVATE); spinnerm.setSelection(seti.getInt("m", 0)); spinner.setSelection(seti.getInt("k", 0)); spinner2.setSelection(seti.getInt("p", 0)); et1.setText(seti.getString...

 java                     1 answers                     33 view
 2018-10-22         Dean

SQL Inner join on select statements

Possible Duplicate: SQL Inner join on select statements I am trying to make an inner join on a select statement like this:select *from (select* from bars where rownum <= 10 )as tab1inner join (select * from bars where rownum <= 10 )as tab2on tab1.close=tab2.closeand I get the following error:ORA-00933 SQL command not properly endedAny help would be appreciated, thank you! You don't have a space between "select" and "" in "select". [XXX]

 sql                     1 answers                     7 view
 2018-10-22         Dean

How do you move a ResultSet cursor to a specific row?

I want to be able to find and display data from any input column, I don't know how to move the cursor to the right row however.This is my code, I know the getRow line is wrong.ResultSetMetaData metadata = rs.getMetaData();int colIndex;int rowIndex;rs = stmt.executeQuery("select COMPANY_CD from ARCUS where CUSTOMER_NO = '"+customer+"'");rowIndex = rs.getRow();rs.absolute(rowIndex);colIndex = rs.findColumn("COMPANY_CD");System.out.println(colIndex);rowPane.add(new JLabel(metadata.getColumnName(colIndex)));rowPane.add(new JLabel(rs.getObject(colIndex).toString())); You can...

 java                     2 answers                     53 view
 2018-10-22         Dean

Can't seem to apt-get update on kali linux [tried many ways

I keep getting such errors: None of these work for me guys, I've tried to change the sources in the sources.list files by enabling one, disabling the other and still no avail, I even tried to connect to the internet using wired instead of wifi. My terminal spits out an error as such:root@kali:~# apt-get updateGet:1 http://ftp.yzu.edu.tw/Linux/kali kali-rolling InRelease [30.5 kB]Get:2 kali-rolling/main amd64 Packages [16.3 MB]Err:2 kali-rolling/main amd64 Packages File has unexpec...

 linux-kernel                     1 answers                     16 view
 2018-10-22         Dean

Importing local json in main.js in Svelte

What is the pattern for importing JSON into Svelte's main.js file?I'm trying:import App from './App.html';import dataset from './../posts.json';console.log(dataset);const app = new App({ target: document.body, data: dataset});export default app;But this does not resolve as JSON cannot be imported as an es6 module. Svelte isn't involved in this process — it's entirely up to your bundler. If you're using Rollup, you'll need to add the rollup-plugin-json plugin to your rollup.config.js file. [XXX]

 json                     1 answers                     82 view
 2018-10-22         Dean

Error: EPERM, operation not permitted with Node.js and Etherpad Lite

I'm attempting to get an Etherpad Lite site up and running with IIS on my computer before I upload it to Azure for Web Sites, but I get this error when I try (http://pastebin.com/4rZWbqix): iisnode encountered an error when processing the request. HRESULT: 0x2 HTTP status: 500 HTTP reason: Internal Server Error You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'. In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose th...

 node.js                     3 answers                     86 view
 2018-10-22         Dean

Assimp library error: taking address of packed member

I wanna implement assimp library in my NDK project with android studio, everything works fine but once i tried to use materials I got the following error:assimp/types.h:208:19: error: taking address of packed member 'r' of class or structure 'aiColor3D' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] return *(&r + i);this is CMakeLists flagsset(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall -Werror") This issue should be fixed on the latest version. You can get the current master from github [XXX]

 c++                     1 answers                     101 view
 2018-10-22         Dean

Animate views inside Recyclerview

I am animating a RecyclerView and everything is working fine except that the views inside the RecyclerView are not showing properly.Using common anim XML <?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android"android:interpolator="@android:anim/linear_interpolator"><translate android:fromXDelta="-100%p" android:toXDelta="0" android:repeatCount="infinite" android:duration="3000"/>//IS WORKING FINE, MOVES RECYCLERVIEW ACROSS SCREEN !Code for RecyclerviewAnimation animLinear;//OnCreaterecyclerView = fi...

 android                     1 answers                     73 view

Page 1 of 142  |  Show More Pages:  Top Prev Next Last