C program gives strange results
◷
تاریخ انتشار: 1395/3/15 | ساعت: 15:22
Vote count: 0 I just started programming and came up with a program to count the number of characters in an input. The code is as below: #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int number = 0; int counter = 0; char sentence[20]; printf("Enter a sentence: "); scanf("%s", ...
API design for Java String results which contain charset-specific data
◷
تاریخ انتشار: 1395/3/15 | ساعت: 15:22
Vote count: 0 In the API of a document converter, which generates HTML (or XHTML), I want to expose these methods: // Convert the input file to a file using the specified charset void convert(File in, File out, Charset charset); // Convert the input document to a string using the specified charset S...
How can I organise structures shown in image
◷
تاریخ انتشار: 1395/3/15 | ساعت: 15:22
Vote count: 0 I Wand To Organised like shown in the image. Thank You asked 1 min agoVinayak Parab 1 Answer Vote count: 0 I Wand To Organised like shown in the image. Thank You answered 1 min agoVinayak Parab Let's block ads! (Why?)
Spring validation does not show error message
◷
تاریخ انتشار: 1395/3/15 | ساعت: 14:21
Vote count: 0 Have a bit of problem showing error message in Spring. The classes are follow: request_new.jsp view file <form:form id="requestForm" method="post" action="" modelAttribute="requestBean"> <form:textarea id="descEmployee" name="descEmployee" path="descEmployee" /><br> <form:errors path="...
How to use jquery selector on nested html
◷
تاریخ انتشار: 1395/3/15 | ساعت: 14:21
Vote count: 0 This is my html: <select id="my-select"> <option value="1100">First option</option> <option value="1200">First option</option> <option value="1300">First option</option> </select> I am trying out scraperjs library to parse HTML. In their github page, there is this example: var scraperj...
template constant operator overloading C++
◷
تاریخ انتشار: 1395/3/15 | ساعت: 14:21
Vote count: 0 How does the below code work?? template <size_t MAX> array<int,MAX>& operator-(array<int,MAX>& a, array<int,MAX>& b) { array<int, MAX> c; int i = 0; while (i != MAX) { c[i] = a[i] - b[i]; i++; } retu c; } Calling :: array<int, 6> c = b - a; I wonder how MAX get its value from the array...
Preventing user from opening multiple tabs for the application
◷
تاریخ انتشار: 1395/3/15 | ساعت: 13:08
Vote count: 0 In my application, it should not allow the user to open the application in multiple tabs for same browser. I need to implement this for some security purpose. How can i implement this? asked 1 min agoaruna a Let's block ads! (Why?)
Why is this regex not matched in python
◷
تاریخ انتشار: 1395/3/15 | ساعت: 13:08
Vote count: 0 I need to find "7.1/10" in "7.1/10&nb" with the following regex: d{1}.?d{0,2}/10 But the following code does not match anything: rating= "7.1/10&nb" p = re.compile(re.escape("d{1}.?d{0,2}/10")) m = p.match(rating) if m: print("rating: {}".format(m.group())) else: print("no match found ...
unexpected variable expecting ',' or ';' for user_data grab
◷
تاریخ انتشار: 1395/3/15 | ساعت: 13:08
Vote count: 0 I have a user_data() function on my website which is supposed to grab a users data from the database when they are logged in. I don't see a problem with the code I have entered, however, it is still retu ing the following error: syntax error, unexpected '$user_data' (T_VARIABLE), expec...
Javascript onclick fails to send value while onfocus of text input
◷
تاریخ انتشار: 1395/3/15 | ساعت: 11:03
Vote count: 0 Have an interesting issue when trying to save some input fields when a user clicks on the Save button. If a user clicks the save button as the next action after typing data the onblur action intercepts the onclick and does not trigger the save. However, if you add some padding (30px) a...
I want to grab the last link using php
◷
تاریخ انتشار: 1395/3/15 | ساعت: 11:03
Vote count: 1 http://redirector.googlevideo.com/videoplayback?mn=sn-p5qlsn6z&source=youtube&mm=31&gir=yes&ip=2a03%3A8180%3A1001%3A16a%3A%3A8ee1&ms=au&id=o-AEiBpwUwd7EB2B4es8OUfgw5YypWvkqIA m_GhcLfxJ&mv=m&pl=40&mt=1465011653&dur=244.994&gcr=us&mime=video%2Fmp4&itag=134&upn=Y1wsHAvpJUk&keepalive=yes&n...
How to check whether the binary no. is convertible to other binary no. or not?
◷
تاریخ انتشار: 1395/3/15 | ساعت: 11:03
Vote count: -3 https://www.codechef.com/JUNE16/problems/BINOP // Go to the link and check the question asked 3 mins agoHimanshu Let's block ads! (Why?)
How to allow only IPs ending with a specific number in IPTABLES?
◷
تاریخ انتشار: 1395/3/15 | ساعت: 9:56
Vote count: 0 I want to allow only the ips that end with number 1 and number 250. X can be any number from 1 to 255. 192.168.X.1 y 192.168.X.250 I'm not sure if IPTABLES has a specific command for this or if it is a subnetting problem. asked 1 min agoPablo Miranda Let's block ads! (Why?)
How would i make this code draw into a circle?
◷
تاریخ انتشار: 1395/3/15 | ساعت: 9:56
Vote count: 0 Can someone tell me how i would make this draw a circle? @Override public void paint(Graphics g) { super.paint(g); for(int i = 0; i < 10; i ++) { g.drawRect((int) Math.pow(i, 2), 10 * i, 32, 32); } } asked 1 min agoJackson F. Let's block ads! (Why?)
Copy Tif image to another Folder
◷
تاریخ انتشار: 1395/3/15 | ساعت: 9:56
Vote count: 0 I'm using WinForms. In my form i have a button. When i press that button i want to copy a Tif image to another location and name it display.tif. I've browsed the inte et for solutions but they all say use "Fil.copy()" so i tried that and it keeps giving me an error. This is my code bel...
New to Tensorflow - trying to repurpose an MNIST multilayer network to a calculator
◷
تاریخ انتشار: 1395/3/15 | ساعت: 8:48
Vote count: 0 Could someone help or guide me through what I should do better in order for this to work? I changed the number of inputs to 2 and generated some random data, "x1" and "x2" (one number to be added to another). The idea is to use variables "add" and "mul" as the real output and base the ...
How to rewrite JS Progressbar.js object to React component
◷
تاریخ انتشار: 1395/3/15 | ساعت: 8:48
Vote count: 0 I play with React for few days, everything seemed fairly easily, until I got stuck with rewriting this JS object as a React component. This is JsFiddle Example with JS object example. How to go about rewriting this as React component? This is what I was trying: import React, { Componen...
Google Sheets - Fill cells in row on demand from external API
◷
تاریخ انتشار: 1395/3/15 | ساعت: 8:48
Vote count: 0 I have a simple script on my personal server that retu s JSON data. I have a Google Sheet with a list of use ames, and I want to be able to somehow run a script on a use ame cell to update only the values in that row, on demand. Is there a way to trigger an apps script that will call m...
Adding a Service Fabric service to System Application
◷
تاریخ انتشار: 1395/3/15 | ساعت: 7:14
Vote count: 0 Is there a way to add a service to the System application of the SF or is that a no go scenario? What I'd like to do is to have a meta-data services about other applications in the cluster, where the service can be queried. asked 1 min agoSean Feldman Let's block ads! (Why?)
Windows WiFi Deauth Protection
◷
تاریخ انتشار: 1395/3/15 | ساعت: 7:14
Vote count: 0 I have lately been testing my inte al network setup for security issues, including problems that arise with the use of WiFi. I have written a python script that will continuously generate Dot11-deauth-packtes and send them to client stations, the AP and the broadcast address. The scrip...