Vote count: 0 The situation is as follows: I have one table(GUI_FILTER) and one sequence(GUI_FILTER_SEQ) I am inserting data using springjdbctemplate, also can use core jdbc as well. In the insert query I am retrieving sequence.nextval and also using a keyholder to fetch that back to java as below. I have tried several ways like using retuRowCount = namedJdbctmplt.update(sql.toString(), namedParameters, keyHolder, keyColumnNames); retuRowCount = jdbctemplate.update(psc, keyHolder); both are failing, org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00936: missing expression StringBuilder s...
ادامه مطلبVote count: 0 I am a newbie to REST API's. I need to post to the website, but I get response code as 400 and content-type as text/plain If I use Advanced REST Client Application of google, I get different results. The response code is 500 and the content-type is text/html. Am I not ending the post data (query1) correctly? Is this the correct way of doing it? Do I need to use JAX-RS? Can someone please help? Appreciate it. import java.io.DataOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.net.HttpURLCoection; import java.net.URL; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; im...
ادامه مطلبVote count: 0 I'm new to PowerBI Desktop, coming from Excel. In the query editor, I would like to create a new column in a table with the difference in time/date from one record to the next, by a separate grouping column (device). An example explains it better. Here's the starting point for the data, with one column for the device id, and another for the Date of the event. Device__ DateA______ 5/1/2016B______ 5/1/2016C______ 5/2/2016A______ 5/4/2016B______ 5/5/2016A______ 5/10/2016B______ 5/9/2016C______ 5/12/2016 I would like to group by Device and Sort by Date, then calculate the differences, to make something like this: Device__ Date _____ LagA______ 5/1/2016___(null)A______ 5/4/2016___3A...
ادامه مطلبVote count: -1 How to calculate price and quantity. I don't want to remove currency type. The price is php generated so i just want to show a calculated price when update quantity using jquery or javascript. Thank you. Here is working demo : $('input[name='quantity']').on('change keyup click', function() { var price = $('.price').text().substr(1); var quantity = $('.quantity').val(); $('.total').text(price * quantity); }); Total : $50.00 Price : $50.00 edited 58 secs agoj08691 asked 2 mins agoprotik Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a mapfile and a remote sld that I want to use to style my vector layer. But each time I put a request the map is retued without a style.My mapfile is as follows: MAP NAME "MAPSERVER QUICKSTART" EXTENT -137 29 -53 88 UNITS DD SHAPEPATH "/data/world" SIZE 800 600 IMAGETYPE PNG24 PROJECTION "init=epsg:4326" END WEB IMAGEPATH '/tmp/' IMAGEURL '/tmp/' TEMPPATH '/tmp/' METADATA ows_enable_request "*" END END LAYER NAME "admin" STATUS ON TYPE POLYGON DATA "countries" CLASS STYLE COLOR 246 241 223 OUTLINECOLOR 0 0 0 END END END END I am using the following request to access the map. Get map request What is it that I could be doing wrong asked 51 secs agokartoza-geek Let's block ...
ادامه مطلبVote count: 0 I come to this forum because I am stuck on a screen tearing problem for about a week now. First of all, I need to say that I have few knowledge and experience in raspberry and python. Here is my problem : I would like to make a program that can display a sequence of png pictures really fast (at a rate of 30 fps or more). To do this I use the pygame library, especially pygame.display.blit and pygame.display.flip. Here is an example of the code (with a homemade delay function) : import time import pygame screen=pygame.display.set_mode(size, pygame.FULLSCREEN) nbPicturesToLoad=12 pictures=range(nbPicturesToLoad) for i in range(nbPicturesToLoad): pictures[i]=pygame.image.load(pictu...
ادامه مطلبVote count: 0 I am New to lea a Angular Javascript. Can anyone gave me the knowledge of Dependency Injection with Its Demo Example. So That I did lea from there. No Good and clear link I have found from Googling. asked 1 min agoSupriya Pandey Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I got 2 forms for a application and I am using a system tray to get it as a popup. But when I enter my useame at my first form and open my second form and click at the popup icon in the bottom it doesn't work for the second form anymore. I also have add this code at my second form. here is the code; private void Form1_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == this.WindowState) { notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(500); this.Hide(); } else if (FormWindowState.Normal == this.WindowState) { notifyIcon1.Visible = false; } } edited 19 secs agoNasreddine asked 2 mins agodiscable10 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 This is my first post but I hope this community can help me! The background: I have a directory containing multiple workbooks. Each workbook contains multiple sheets, both hidden and visible. I would like to copy one particular sheet from each workbook into an existing master workbook. The problem: At the moment, my code copies the first sheet in each source workbook. I require the code to copy only the sheet called "[current month] Summary", which is most often not the first sheet in the source workbooks. Because the [current month] will change, it needs to copy the sheet where the last seven letters of the name are "Summary". My code as it stands: Dim wbDst As Workbook Dim wb...
ادامه مطلبVote count: 0 I am new to C#2015. I just realized that the old classical way of adding event handlers by double-clicking on the item no longer works for some items like the form (or the Window). After some google searchs I still can't figure out a way to add the Load event of the form using the designer. Do I have to manually write code for that unlike in VB2005? Sorry for this extremly begier level question asked 1 min agoSadeepDarshana Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have an own custom BeanFactory: class MyListableBeanFactory extends DefaultListableBeanFactory {...} and an ApplicationContext: public class MyAppContext extends AotationConfigApplicationContext { public MyApplicationContext () { super(new MyListableBeanFactory ()); } } and this bootstrap code: @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplicationBuilder application = new SpringApplicationBuilder(); application.sources(DemoApplication.class); application.contextClass(MyAppContext.class); ConfigurableApplicationContext context = application.build().run(args); //... } } So far, everything is fine. Now, I have a Test cla...
ادامه مطلبVote count: 0 I'v installed this https://github.com/tsechingho/ckeditor-rails lib into my Rails application. I would like to use CkEditor image upload functionality, but i'dont know how to write the backend logic, how to handle request, save file and send a response back to CkEditor to display uploaded image. The CkEditor's configuration is the following: CKEDITOR.replace( 'editor1', { language: 'en', filebrowserImageUploadUrl : "/upload", filebrowserUploadUrl : "/upload", }); Rails function def upload @func_num = params["CKEditorFuncNum"] @ck_editor = params["CKEditor"] render :layout => false end asked 32 secs agoNagy Ervin Let's block ads! بخوانید...
ادامه مطلبVote count: 0 For the following program, fill in the blank with the appropriate malloc() statement, and eliminate the memory leak in the program: int main(void) { char *name = NULL; // length of the dynamically allocated string int array_size = -1; // length of the user's name int length = -1; while (1) { printf("How many letters are in your name? (0 to quit) "); // Note: scanf() always wants the address // where it should store the input it's reading. scanf("%d", &length); if (length == 0) break; if (length + 1 > array_size) { // Finish this line name = malloc(...); array_size = length + 1; } // Check your understanding: Why do we // use name instead of &name in this // scanf() statement? s...
ادامه مطلبVote count: 0 My approach is using AngularJS Service instead of factory along the project. Now I want to build an object called MyData which should be used as array in angularJS controller, such as: vm.datas= MyData.query({}, function (datas) { vm.thisData = {selected: datas[0].id}; }); As I searched in questions, I understood I can use factory as below: angular.module('myDataService', ['ngResource']). factory('MyData', function($resource){ retu $resource(myURL, {}, { query: {method:'GET', isArray:true} }); }); What should I do if I want to use service. Is the code correct, below? What is the best practice? angular .module('app') .service('myDataService', myDataService); myDataService.$injec...
ادامه مطلبVote count: 0 i can send data to mysql table and it is working good. now i want to get that data. i tried this code but it doesn't show any data from mysql table. can anyone help? maybe there is a different way? thank you PHP code: Controller: "use strict"; var app = angular.module('dataSystem',[]); app.controller('customerCardsCtrl',function($scope,$route,$location,$http){ $http({method:'GET', url:'api/get-allCustomers.php'}) .then(function(response) { $scope.customers = response.data; }) // This will log you the error code and trace, if there is an error. .catch(function(err) { console.log(err) }); }); }); html code: ufeff כאן יהיו רשימת כרטיסי לקוחות {{ x.customer_id}} {{ x.first_name }} ...
ادامه مطلبVote count: 0 I'm mostly new to C# and I've been writing code to practice. I've written some code where you enter a line of text, or a "login key", and I want to make it where you can confirm that login key. Here's the code I've done so far, I will use "//" on the part I'm stuck on. (Wont include any uecessary code.) Console.WriteLine("Please enter a login key."); string Key = Console.ReadLine(); Console.WriteLine("You entered, " + Key + " as your login key!"); Console.WriteLine("Are you sure you want to choose this as your login key? "); // This is where I'm stuck at, got no idea how to do a yes/no prompt. } Any help would be greatly appreciated. asked 26 secs agoCole Maddox Let's block ads...
ادامه مطلبVote count: 0 I am having a problem with determining why a class is not being removed in an each function. I want to check and see if the element containing a specific class is being manipulated somehow by some other event or function. This code is not succeeding in removing the class 'cc-gone' from the content elements. var content = form.find('.cc-form-content-container'); $(content).each(function() { console.log('unhiding content containers'); $(this).removeClass('cc-gone'); }); I tried adding a MutationObserver, copying the demo, with slight modifications (the class name to track and the console output): // select the target node var target = document.querySelector('.cc-form-content-cont...
ادامه مطلبVote count: 0 I'm developing a web application.My App is using Javascript, PHP, HTML. I already done apply code to upload xlsx , attach it on screen . Here's my Code Load CSV file : // check browser support // console.log(SimpleExcel.isSupportedBrowser); var fileInputCSV = document.getElementById('fileInputCSV'); // when local file loaded fileInputCSV.addEventListener('change', function (e) { // parse as CSV var file = e.target.files[0]; var csvParser = new SimpleExcel.Parser.CSV(); csvParser.setDelimiter(','); csvParser.loadFile(file, function () { // draw HTML table based on sheet data var sheet = csvParser.getSheet(); var table = document.getElementById('result'); table.ierHTML = ""; shee...
ادامه مطلبVote count: 0 I want to delete only empty folders from directory before last 30 days using batch. I am using following batch command to delete empty folders but i want to delete only those empty folder which modification date is before 30 days. for /f "delims=" %%d in ('dir "c:fileworksystem_temp" /s /b /ad ^| sort /r') do rd "%%d" asked 7 mins agoAbhi G Let's block ads! بخوانید...
ادامه مطلبVote count: 0 using msxml in VBA ,i have a IXMLDOMNodeList list and i want to delete nodes in it but since more then one element of the IXMLDOMNodeList is pointing to same node , once a node is deleted i will get error when another IXMLDOMNodeList element pointing the same node is reached . is there is way that i can get unique elements from IXMLDOMNodeList thanks asked 40 secs agofarooq Let's block ads! بخوانید...
ادامه مطلب