@holroy I've seen it get... tense, sometimes, indeed, when you are trying to have a serious conversation about a post, and you know there are like 15-20 people who are watching and not saying anything
Hey this works... is that what one would call "recursion"? Or what's a better name for this?
if exists (
select 1 from sys.objects where object_id = object_id('#test')
) drop table #test;
create table #test (RowId int);
insert into #test (RowId)
values (1),(2),(3);
select *
from #test as t1
join #test as t2 on t1.RowId = t2.RowId + 1
Isn't it annoying when you can't find a file you recently created? Especially when you either have a very disorganized drive or a directory with lots of files.
Even if you don't care, isn't it nice to have a program be able to locate a file for you?
I did this because I have files that I can't ...
For returning multiple files I thought maybe you could make a Map<String,String> with the file path and file name, then just concatenate them on the output?
To my surprise an isPalindrome test for integers in c was faster using div and mod, instead of converting into a string and testing it with pointer arithmetic. If interested in details see my answer.
@holroy div and mod are probably single CPU instructions whereas converting it to a string brings a lot of extra work with it, so that would make sense
You have a point. I just tested it as the OP was wondering about it, but hadn't provided code for it. But I kind of assumed it to be slower as the two other answerers didn't look into that part at all.
I have an MVC framework I've written. I'm trying to abstract out ASP.NET specific bits as well as make it more testable. Previously, I relied on HttpContext.Current in many places, which proves to be very unfriendly to unit testing. So, I started designing my own minimalistic interface for everyt...
This is based on reading a txt file that is in bin folder and parse the c# code written in a file. The output must be if a word is a keyword, identifier, separator, identifier or numerical constant.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Syste...
@RubberDuck Hey! You may not have noticed (I don't know if this would go inside your notification box), but I had started a room with you the other day. If you had the time, could you quickly check it out? (I don't mean to be rushing you)
@Quill Actually I did check it, but the screen fooled me a little, and in addition the diff change on that revision shows that the added text followed by removed text, so I got confused.
And I don't think I offended anyone by 'calling it out'... It's not like I was rude or anything. Or at least that was not the intention at all
> 0xDBE provides unified support for all major version control systems (Git, SVN, Mercurial, and many others), so you can easily work on different projects from different version controls, and never worry about anything when switching between them.
> Renaming and Finding Usages The IDE correctly resolves all table and column references over your SQL files and enables you to rename any symbol and its usages easily.
@Mat'sMug That was a neatly placed <!-- -->. I didn't VTC it, but I didn't read it either to discover that part which clearly indicates how it is run! Great catch!
I'm working on a simple(ish) BlackJack but I'm having some troubles. I'll post the code then outline the problems I'm having so you can reference it. Keep in mind I'm trying not to use globals. And I know I'm really bad at commenting my code.
The order of play should be:
1. Draw 2 cards for play...
@Hosch250 sure, its possible. i don't get much web traffic. the plan for this game was always to try to sell it for 1.99. i do have a pc version up on itch.io, and that one has save and load which the html version lacks
Some of my friends are taking a Java class at my high school, and their final was literally "copy-paste this code into netbeans and find + fix the 3-some errors lying around".
You guys (and girls if present), When on the main site you'll get flags indicating new comments and upvotes and stuff in the top bar. Are these possible to get whilst here in the chat room?
Hey guys i have a quick question. I am playing around with the Java (Javascript) ScriptEngine. I was thinking "Wouldn't it be great to have TCP sockets?" So I have a dilemma: do I make the Javascript code complicated and make the API simple reflection, or do I make the Java code complicated, and make wrappers for basic IO things?
You will also "get" them pretty rapidly through push notifications if you have the Stack Exchange app on your mobile device, although it feels delayed by I'd say 10-15 minutes
@Phrancis That I know, but I would like them to be seen whilst I'm chatting. My thinking is that whilst I'm hanging out here it would be nice to be notified that someone has a comment on one of my post, or I could get a notification of up-votes so that I could take a look at that.
@Phrancis I do get the mobile app, and use that as the trigger now, but to me it would have been nice to have that by default. Maybe I should post a feature request at meta.stackexchange.com or something like that...
I can see both advantages and disadvantages, but I'm good as long as long as I now when the base data is updated. I was kind of wondering if something was wrong, or not. And due to your information, I know nothing is wrong, and I can keep on cleaning up
Not knowing what your XMl files are like or what you're trying to extract from them, this is mostly speculative:
Generally, you want to strip away as much unwanted data as early as possible in the process. Rather than trying to import an entire file to the worksheet every time, why not strip you...
REM When your VBA is long
REM And the night, the VBE is yours alone
REM When you're sure you've had enough
REM Of this code, well hang on
REM Everybody hurts
REM Take comfort in your Rubberduck
@glennjackman, Please read a Guide to Code Review for Stack Overflow users. I'm not sure this belongs on Code Review. He wants a rewrite and extension of functionality. Code Review might suggest rewrites and extension, but the main criteria is that code should already work as intended. My opinion is that it does indeed belong here on Stack Overflow! — holroy45 secs ago
You should probably post this type of question on the CodeReview site. See the answer here. — Pushkin14 secs ago
I was talking about filtering chat messages that are code blocks out of the neural network as it would cause the content to be riddled with random code-snippets
@Quill but the piece of information consisting in user 12345 posting a 3-line code block of broken JavaScript should be useful information for a neural network, no?
Is this an effective way for merging two lists? It seemed too long.
struct Node {
int item;
Node *next;
};
Method:
Node* mergeTwo(Node* headA, Node* headB)
{
Node* currentA = headA;
Node* currentB = headB;
Node* headC = NULL;
Node* currentC = NULL;
while (currentA != NULL && current...
TL;DR: The Problem
This keeps happening in chat:
Surprise at flags on vulgar messages. Language that would invariably get your comments deleted on the main site occasionally gets flagged and deleted in chat. Confusion reigns.
Controversial topics leading to bickering and name-calling. Folks b...
My goal is to continually update an object and record any changes and the times they were made at. The input has to be JSON but the output/storage format doesn't.
This function will check a JSON object/dictionary against a reference object and return a list containing the updated object and anot...
I have list of 70 question out of which I want to select 50 random and unique question numbers. how to do this in c#.
static Random random = new Random();
static void Main(string[] args)
{
List<int> questionNumbers = new List<int>();
for (int i = 0; i < 70; i++)
{
questionNu...
Apparently, one early translation engine translated "out of sight, out of mind" into "invisible idiot" when the original text was translated to Chinese, then back again.
BTW, don't look at this image unless you don't mind the sight of blood: a.disquscdn.com/…
Can please somebody help on how to open Tkinter GUI window in browsers with apache ?? right now when I run that python code,the GUI window is coming locally.
I'm still working on memory leaks today.. We have no idea where the memory leak is now :( There's some jQuery stuff but all the low hanging fruit is gone
In my ASP.NET form I have a file upload control where I am letting users upload image files, converting it into base64String to store it in the database.
I am using following code to do so,
if (FileUploadControl.HasFile)
{
var img = new Bitmap(FileUploadControl....
@Mat'sMug Retracted. However, note OP didn't do anything. It's all community work to get the question up to par. I'll not retract my downvote, but I'm glad the community fixed it.
Bring Me the Horizon are a British rock band from Sheffield, Yorkshire. Formed in 2003, the group currently consists of lead vocalist Oliver Sykes, lead guitarist Lee Malia, bassist Matt Kean, drummer Matt Nicholls and keyboardist Jordan Fish. They are signed to RCA Records globally and Columbia Records exclusively in the US. The style of their early work, including their debut album Count Your Blessings, has primarily been described as deathcore, but they started to adopt a more eclectic style of metalcore on subsequent albums. Furthermore, their latest album That's the Spirit, marked a shift...