paul steven

1

votes
4

answer
9.7k

views

access iif query do nothing when false

My situation/problem: TableA id, postalcode, region Criteria for the field i want to add value in (postalcode): =IIf([tableA.Region]='Chicago','60064',[postalcode]) What i need to accomplish is an iif-query where: In the field postalcode I check in the criteria if the field region equals Chicago. If...
paul steven
1

votes
1

answer
84

views

Concatenating strings using plus signs in a parameterized query

I want to ask how to implement something like this in SQL String updateUserDocs1 = 'UPDATE USERDOCS SET VIEW_DOCS = VIEW_DOCS + ' ' + ? WHERE USER_ID = ?'; It returns a java sql syntax error. encountered: 'WHERE' at line 1 The statement appears to be syntactically correct. What could be the problem?
1

votes
2

answer
0

views

Python - execute for loop in multithreading

I am new to python. for loop iterates element one by one. I want to know how to execute all the elements in the for loop at the same time. Here is my sample code: import time def mt(): for i in range(5): print (i) time.sleep(1) mt() It prints the element one by one from for loop and wait 1 sec for n...
Paul Steven
1

votes
3

answer
69

views

Convert log file into json file using python

I am new to python. I am trying to convert the log file in to json file using python script. I created a main file and a del6 file. Here, it will convert the log file and write into a new json file. On execution, it shows me the following error. Traceback (most recent call last): File 'main.py', lin...
Paul Steven
-1

votes
5

answer
25

views

Add dictionary values stored in variable to the list python3

I am new to python. I want to add the dictionary (keys and values) to the list continuously. The list already contains some dictionary values. It should be added next to it. Any suggestions please... Here's the code: from datetime import datetime fields = {'a': 'steven', 'b': 'kumar'} timestamp = da...
Paul Steven
1

votes
1

answer
0

views

Add custom fields to JSON file based on user input from YAML file - Python3

I am new to Python. I am having the one YAML file and I am accessing it with a Python file. In YAML file, there is fields option. In YAML file, User can set variables with values. The Python file reads the variables with values and then adds it to the JSON file. Note that the variables and values ca...
Paul Steven
1

votes
1

answer
70

views

TypeError: a bytes-like object is required, not 'int' python3

I am writing a contents to JSON file. It works great in Python2 . But it fails in Python3 due to the introduction of Bytes concept. So to make it work, i converted str to bytes and converted successfully. After that, i checked the type and it was in bytes. Now python3 shows me a error again even it...
Paul Steven
-1

votes
0

answer
16

views

how to get ubuntu machine id using python

I want the get the machine id from my system by using python code. My machine id is stored in '/var/lib/dbus/machine-id' . The machine id was '556b837c93cd4b8dbd3a1c01f468d9f5' How to get the number from the file and assign it to a variable using python. Any code suggestions..
Paul Steven
1

votes
1

answer
43

views

java - recursion code explanation (check if ascending)

I am recently finished creating a program that checks if a user-inputted int array is arranged in ascending order. I have my function isAsc here: public static boolean isAsc(int[] arr, int index){ if (index==1 || arr.length==1){ return true; //Base case } else if (arr[index-2] >= arr[index-1]){ retu...
3

votes
3

answer
601

views

Java - Testing if a character array is a palindrome by means of recursion

I tried searching for solutions, but all that I have found are for strings. What I am trying to do is to check if a character array inputted by the user is a palindrome. Here's what I have so far: public static boolean palCheck(char[] a, int index, int start) { if (a[start] != a[index]){ return fals...
2

votes
0

answer
180

views

webbrowser method for webkit to retrieve attribute

I'm trying to figure a way out off the following scenario: I'm using c# to create a webbrowser for a specific use. When i'm using the webbrowser component in visual studio, i can use the following code: public void clickSubmit() { try { foreach (HtmlElement hem in WebBrowser1.document.all) { if (hem...
paul steven