Somebody else's problem (also known as someone else's problem or SEP) is a psychological effect where people choose to dissociate themselves from an issue that may be in critical need of recognition. Such issues may be of large concern to the population as a whole but can easily be a choice of ignorance by an individual. Author Douglas Adams' comedic description of the condition, which he ascribes to a physical "SEP field," has helped make it a generally recognized phenomenon. Somebody Else's Problem has been used to capture public attention on matters that may have been overlooked and has less...
I added class in method in python.
>>> def a():
... class A:
... print "a"
...
When I call that method, it print a Why?
>>> a()
a
I didn't call inner class or create object of that class?
HexToString function returning maximum of 16kb even for sources greater than 16KB
string HexStringToString(string HexString)
{
string stringValue = "";
for (int i = 2; i < HexString.Length / 2; i++) // Starting from position too just to avoid the 0x Hex Code that m...
Developing an application in Laravel, i am working on the invoice section with the help of jQuery.Actually everything works fine but when i added the below jQuery code then my page do nothing via jQuery.
PS: If any thing else is needed for explanation just mention in comments.
jQuery Code:
$('...
I am currently trying to learn how to code websites using HTML and CSS.
I have attempted to make a navigation bar however I can not get the text to align vertically in the middle in the navigation bar.
I have done what has been said here
However it didn't work for me. If anyone can tell me how...
soo... I see a do-while there, which suggests that either you got it to work all by yourself (congrats) or this code doesn't do what you want. Or alternatively the last sentence in your question is misplaced. In either case, you should add some explanation as to what your code does (and should do) and maybe what you expect out of the review... — Vogel612Mar 15 at 0:59
I have the following Swift code:
class ThingChecker {
static func checkThing() -> [String: [String]] {
return Thing.stringsDictionary()
}
}
Where Thing is a class implemented in Objective-C with the following interface:
@interface Thing : NSObject
+ (NSDictionary<NSString *, ...
The loop tag is generic... like, very, very generic. Generic as in, if your code doesn't loop somewhere, it's probably not a computer program. Hence I'm nominating the loop tag for burnination.
Numbers and stuff:
As of 2016-04-06 there are 460 posts tagged with loop
At the same time, the lang...
I've been having some issues programming a long code for my university programming lab course. I've been asking around but cant figure out why my program crashes after everything executes and successfully calculates and displays all I need. Before the loop in main() could execute however, the pro...
Like those who have come before me, I foolishly have sought to implement a generic, efficient, idiomatic, and most importantly correct method of comparing floating point numbers. Like those who have come before me, I have most likely failed in at least one of those regards. I'd appreciate commen...
The loop tag is generic... like, very, very generic. Generic as in, if your code doesn't loop somewhere, it's probably not a computer program. Hence I'm nominating the loop tag for burnination.
Numbers and stuff:
As of 2016-04-06 there are 460 posts tagged with loop
At the same time, the lang...
@nhgrif I am honestly asking tongue-in-cheek. But, honestly, it may help differentiate between an experienced coder and a relatively new one. Or it may help to indicate that the program is not specifically exercising OOP styles. Or it might be useful just to indicate that a reviewer may be in for a bumpy ride.
@nhgrif We'll see how it goes, IMO if the posts you mentioned are reason enough to have a loop tag, then I'd say the overwhelming majority of posts which have that tag should have it removed
and data-structures seem less out of place on code that happens to have data structures than loop-mechanics does on a post that coincidentally has loops.
I would like to know if it is possible for MultiTouch to be implemented on HTML.
Scenario like this:
<iframe id="Example1"
src="examplescroller.htm">
</iframe>
<iframe id="Example2"
src="examplescroller.htm">
</iframe>
Two iframe are been used, two of...
protip: don't put JS inline. Have an onchange handler? <select onchange="handleChange(this)"> and then have a real JS function that checks what the user selected, so it can do filtering when necessary. There are a lot more things you can improve here, but that's for codereview.stackexchange.com to comment on. — Mike 'Pomax' Kamermans23 secs ago
Is there a better or shorter way to write the SQL query below?
SELECT * from GR_data
where doNo IN
(
SELECT dt.doNo FROM
(
SELECT doNo,po_number from GR_data
where DATALENGTH(Mat_No)<=0
group by doNo,po_number
)as dt
group by dt.doNo
having COUNT(dt.d...
This is a question from programming contest. This contest is already over.
Now, all the prime numbers are arranged sequentially in ascending order. i.e:- 2, 3, 5,7...and so on. Now, your task is to calculate those prime numbers which are present at a prime position. For example, 2 is present at ...
@JnxF Yes thats true but to me using If/Else's are just way too over the top for such a simple function. In my Code I never like repeating the same or some of the same code just for Conditions. — ShinyMK31 mins ago
I think that person just implied they only like to have one if/else block in their code.
Im just playing with the new asp.net core application structure and noticed that the boiler plate code generated by the teamplate includes the following when logging in the user:
if (result.Succeeded)
{
_logger.LogInformation(1, "User logged in.");
...
I am working on an instant chat messaging application.I am getting contacts from phone and displayed them in list view of an activity.But it is taking 25-30 seconds.I am using the following code:
1. On clicking Contact button:
contacts.setOnClickListener(new View.OnClickListener() {
...
It's because Skype uses a specific kind of peer-to-peer networking.
Basically, if you have Skype, and you have a fast internet connection and open NAT, it will use your device as a server for other devices (me) to connect to for intermediary communications.
So instead of having to have a huge network of servers, they use other Skype clients for it.
@JeroenVannevel Have you ever used Git in Visual Studio to manage multiple projects with different repos for each project, rather than a solution-wide repo?
I'd just like confirmation if the code below is bad practice or not, I feel it is:
public class DeliveredCommunication{
private String deviceId;
private int versionMajor;
private int versionMinor;
private int versionPatch;
private JSONArray messages;
private DataMapper ...
I'm trying to figure out how I can have the element scroll to a particular element using data-attributes if it matches the ID instead of using anchor tags. Here is what I'm working.
Once the user clicks on a button it will show the content and also scroll to that particular element that matches...
##open file and create a dictionary of {"word":"sorted word"}
word_file = open("word_list(1).txt","r")
word_list = {}
for text in word_file:
simple_text = ''.join(sorted(text.lower().strip()))
word_list.update({text.lower().strip():simple_text})
##lowercase and sort the user input word
...
I would like to get images from other websites.
I'm not sure about this method is alright.
<?php
header('Content-Type: '.image_type_to_mime_type(exif_imagetype($_GET['url'])));
echo(file_get_contents($_GET['url']));
?>
If not, how should I do it?
Task
Write a program that, given the amount to make change for and a list of coins prints out how many different ways you can make change from the coins to STDOUT.
My approach
The number to make change for is N. Take one coin C and sum the number of ways to make N - C with the other coins. Add...
Just wondering how much responsibility there is on the teachers, on a high school the teachers would likely brought to court, on an university I don't know?
Lately, I have been working on this Huffman algorithm and it is finally done, though I think it is improvable due to the fact that people say you have got to use two priority queues but I ended up just using one, so maybe it is even not correctly implemented.
Code:
#include <iostream>
#include <...
During my study we attempted to build a coil gun. Needless to say the 400V capacitors discharged over my thumb instead of the coil and I almost smashed the glasses of the guy behind me in reflex.
after a few more searches it seems nobody on the internet (who felt worried) has a large enough set of batteries to make it dangerous because most hobby experiments are a couple of 9v batteries
I have a model called booking.
class Booking < ActiveRecord::Base
has_many :charges
def charge!
raise "Not active" if !active?
c = charges.create()
c.charge!
end
end
However I feel this is not optimal. For example, it would be nice to integrate the activeness checking into R...
I shall make a JavaScript-function which does the same as PHP's array_diff:
http://php.net/manual/de/function.array-diff.php
Because it is intended to use the function as a (internal) library-function I have tried to catch everything which could possibly go wrong concerning incorrect usage.
More...
I was trying to do a sample threading program, where the spawning of thread is in a while loop. I DO NOT want to generate multiple number of threads. The while loop should keep on running, irrespective of whether the thread completed execution or not. There is a call to the .get() function of the...
Basically, it's been brought to our attention that our end user acceptance testing environment will be being demoed to another country on Monday this morning
The current UAT environment is quite unstable as we've had massive changes to the app in the past 2 week sprint
So we've mentioned that this is a bit of a curveball and that we should have been told ahead of time and that maybe we should have a separate environment for demoing to new countries, rather than having UAT being the only stop between feature graduation and live
And our manager said along the lines of "Don't you have a local dev environment? Don't you catch all of these bugs in there? Do you not test against your local dev environment?"
Even though a lot of the bugs are obscure and finding them all would take full regression tests after each change. Until we have unit tests, that's not really feasible; we'd need more resource
Basically they want to have their cake and eat it too :s
The version changes have involved database changes that are supposedly not backwards compatible (I think it's mor ethe case that they might not be than they actually aren't).
So there's no way to know whether or not the old DB is compatible without completely tearing down the UAT environment and building it from scratch anyway.
@Mast I mean, hell, I'd happily work overtime to get this stable and all tested for monday as I'm going on holiday. But I don't think that I could convince my boss to foot that bill.
I had to build a responsive component which allows the user to display specific content in a page. I called it the contentToggler.
Here is my component in action
HTML Structure of togglers & contents :
On small screens : <select> with <option>
On big screens : <div> containing <buttons>
<sele...
Im using the following code to parse html, This code is working but since Im new to JS and working in alone project I would appricate if you can give me some tips and feedback how can I improve this code,or it is fine.
The code need to update script content after existing script with new conten...
How do I create a new user account in Java? I've tried researching it but I can't seem to find the answer I'm looking for. Any help would be much appreciated. Thank you.