id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23509900 | Thank you,
Archie
<!DOCTYPE HTML>
<html>
<head>
<title>Drum sounds with audio tags</title>
<style>
div#audioElements {
display: block;
background-color: rgb(100,250,90);
}
div#padArea {
float: top;
... | |
doc_23509901 | compile project(':razorpay-android-2.0.1')
Currently, payments are working fine.
Now I need to implement recurring payment (Auto-renew / subscription) using Razorpay.
I couldn't find any clean docs for the same. Please feel free to update me with valuable info.
A: Finally, I found it myself.
There are 3 main steps:
... | |
doc_23509902 |
There is already an open DataReader associated with this Command which must be closed first. (System.Data)
I am trying this from a fresh reboot of the machine so there are no other previous connections. How do I close the DataReader / fix the problem?
I've tried posting this on the Database Administrators but no-one ... | |
doc_23509903 | AttributeError: 'Figure' object has no attribute 'set_canvas'
I just want to add this figure into graph_frame as mentioned in the code followed.
import yfinance as yf
import plotly.graph_objects as go
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,NavigationToolbar2... | |
doc_23509904 | class AsyncLoad extends AsyncTask<Void, Void, ArrayList<ListData>> {
int i = 0;
protected ArrayList<ListData>[] onPostExecute(ArrayList<ListData>... result) {
return result;
}
protected ArrayList<ListData> doInBackground(Void... parameter) {
ArrayList<ListData> news = null;
... | |
doc_23509905 |
Deprecated: Non-static method AJAXChatFileSystem::getFileContents() should not be called statically in C:\Apache24\htdocs\services\chat\lib\class\AJAXChatTemplate.php on line 37
I tried changing function getContent() to public static function getContent() but after that it's showing:
Fatal error:Uncaught Error: Us... | |
doc_23509906 |
A: one idea would be to set the appropriate locale from the OS environment variables, then create a date/time string using directives
%x Locale’s appropriate date representation.
%X Locale’s appropriate time representation.
and finally "reverse-engineer" the format using for example pandas' datetime guesser:
im... | |
doc_23509907 | I made a class (InfoBean) with all the (parcelable) data. When I send the data from the MainActivity, the data from bean.newTheme (2131296447) is there but as soon as I try to retrieve in the Fragment, the value is 0!
Could someone pls have a look, what I`m doing wrong? Thank you for your help.
Send data (MainActivity)... | |
doc_23509908 | import pandas as pd
stats = pd.read_csv('question2_data .csv')
print(stats)
team_count = 0
Output:
Team ID Wins Losses Ties
0 9867 4 2 3
1 1234 7 5 2
2 6213 9 7 0
3 1231 12 2 2
4 8821 2 7 7
5 1131 8 0 ... | |
doc_23509909 | I have the following code on my onSubmit Event as below:
function onFormSubmit(e){
var formResponses = FormApp.getActiveForm().getResponses();
var formResponse = formResponses[formResponses.length-1];
var itemResponses = formResponse.getItemResponses();
for (var j = 0; j < itemResponses.length; j++) {
var ... | |
doc_23509910 | <head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
</head>
<body>
<script>
<!--bar stacked-->
var data2 = {
CC: [{
code: '123ASD',
labels: ["7/2... | |
doc_23509911 | edit: found my issue! I was sorting the array, but after that line the array goes back to normal. What I needed to do was assign a local variable for small.sort then add the first element of that variable to the array.
array = [
[3, 5, 7, 1, 2],
[98, 35, 2, 34],
[88, 37, 5, 6]
]
smallest_array = []
array.each... | |
doc_23509912 | This is a pic of a part of matrix:
As i know I have to change it to the following format which doing that manually is very hard. Is there any other way?
cm=[[ 9.37616521e-01, 0.00000000e+00, 2.72479564e-03, 9.03484870e-03
3.58525742e-03 , 4.70385774e-02]],
[[ 0.00000000e+00 , 6.55069086e-01 , 3.319460... | |
doc_23509913 | Is there a method within Python to get a file from a URL? I was not able to find anything without an external library
A: You can use urllib.urlretrieve() that saves the opened page to the specified path.
Alternatively you can open the url with urllib.urlopen() and then write the read file in the binary mode:
import ur... | |
doc_23509914 | I followed the code sample provided in wso2cep-3.1.0/samples/producers/activity-monitor
please see the following code snippet
public class GatewayServiceSkeleton{
private static Logger logger = Logger.getLogger(GatewayServiceSkeleton.class);
public RequestResponse request(Request request)throws Agen... | |
doc_23509915 | Input
example = [['a', [], 'b', (), 1, None],
['a', [], 'c', (), 0, None],
['a', [], 2, None, None, None],
['a', [], 3, None, None, None],
['a', [], 3, None, None, None],
]
Expected output
output = {'a': [{'b': (1, None)},
{'c': (1, None)},
... | |
doc_23509916 | >df
School1 School2 School3
Program1 1 1 1
Program2 1 0 1
Program3 1 1 0
The number 1 indicates that the school receivied the program and the number zero, no receivied. I would like to plot a simple square like the a cheesboard (black for 1 ... | |
doc_23509917 | 1.
try! realm.write {
...
}
2.
realm.beginWrite()
...
try! realm.commitWrite()
A: Another case to use beginWrite & commitWrite is when you don't want to fire change notifications.
To do so, you can pass the notification token to commitWrite as,
commitWrite(withoutNotifying: [token]).
More detail is in the Realm'... | |
doc_23509918 |
A: AppState is your friend! Have a look at the documentation of AppState.
So in your component, where the setTimeout exists, just require AppState and add an event listener like this:
AppState.addEventListener('background', this.handlePutAppToBackground);
AppState.addEventListener('inactive', this.handlePutAppToBackgr... | |
doc_23509919 | https://guides.rubyonrails.org/active_record_callbacks.html
A: You can use after_find as it will be called after record loaded from database.
The after_find callback will be called whenever Active Record loads a record from the database. after_find is called before after_initialize if both are defined.
https://guide... | |
doc_23509920 | my html is:
<td class="uneven">
<div class="buttonbundle up">+</div>
<input onkeyup="bundle.changeOptionQty(this, event)"
onblur="bundle.changeOptionQty(this, event)"
class="input-text qty"
id="bundle-option-1-1-qty-input"
type="text"
name="bundle_opti... | |
doc_23509921 | $(document).ready(function () {
$.ajax({
type: "POST",
url: "/somedomain/shoppingcart/add",
data: { "name": name},
success: function(data) {
$.get("/some-domain/shoppingcart/show", function(cart){
$(".shoppi... | |
doc_23509922 |
A: AFAIK http and httpModule were the ones used before the introduction of an improved version: the httpClient and httpClientModule.
Both ara available for compatibility reasons, but http and httpModule are deprecated (they will disappear from Angular after a while) so if you are in a brand new project, use the newer ... | |
doc_23509923 | void DoSomething(CComPtr<Excel::Range> &masterCell)
{
// ...
CComPtr<Excel::Range> cell = masterCell->Offset[vertical][horizontal];
// ...
}
When compiling an excel addin for x64 I'm getting lots of spurious errors such as:
cannot convert from 'Excel::Range' to 'ATL::CComPtr<T>'
However, when I compile fo... | |
doc_23509924 |
For example, I want to see only columns which have more than 4 non empty rows.
Hence, columns 70672, 1014006 and 1014015 should not be visible.
Is that possible?
Thanks in advance.
A: If you can add a helper column to your original data, you could do something like:
=COUNTIFS($C$2:$C$193,">0",$B$2:$B$193,B2)>4
And... | |
doc_23509925 |
A: No. Instead allow your app to alter itself when something has been purchased. Call a method on the objects that need to have their content changed so they can be notified of the state change and alter their own internals to conform.
Sometimes if it seems there is no way to do what you want, then there is a better... | |
doc_23509926 | Here is my code when add the file button is clicked.
public void addFile(View view) {
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");
startActivityForResult(intent, 10);
}
@Override
protected void ... | |
doc_23509927 | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:out="http://soap.sforce.com/2005/09/outbound" xmlns:urn="urn:sobject.enterprise.soap.sforce.com">
<soapenv:Header/>
<soapenv:Body>
<out:notifications>
<out:OrganizationId>?</out:OrganizationId>
<out:ActionId>... | |
doc_23509928 | [Browsable(bool.Parse(Sytem.Configuration.ConfigurationSettings.AppSettings["testBool"]))]
However Visual Studio 2008 would give me an error "An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type".
Is there any way to set this bool on App.con... | |
doc_23509929 | The code that creates the config for the upload:
<backend_model>adminhtml/system_config_backend_image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">voucher/logo</upload_dir>
<base_url type="media" scope_info="1">voucher/logo</base_url>
but when i try to get it:
Mage::getBaseUrl('media').... | |
doc_23509930 | Let's suppose for example that myapp 1.0 has a:
class employee {
public:
char *mp_name;
unsigned int m_age;
(and all needed serialization methods)
}
Next you develop myapp 2.0 which adds support for salaries, but instead of modifying the classes in 1.0, you derive new classes:
class employee20: p... | |
doc_23509931 | Belongs to Chapter 10 Concurrency Item 66.
public class StopThread {
private static boolean stopRequested;
public static void main(String args[]) {
Thread backgroudThread = new Thread(new Runnable(){
public void run() {
int i = 0;
while(!stopRequested) {
... | |
doc_23509932 | i.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
ImageView i = (ImageView) v;
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
long firstTouch = S... | |
doc_23509933 | //======================================
// SHARED THEME STYLES
//======================================
@include mat.core();
.dark-theme {
//======================================
// THEME INITIALIZATION
//======================================
@include mat.core-theme($theme);
@include mat.all-com... | |
doc_23509934 | Package Name, Data Flow Task Name, Source Connection or Source DB, Source Table/File, Destination Connection or DB, Destination Table.
Is it doable?
A: You can absolutely write this using the correct version of the SQL Server binaries and your favorite .NET language to do so.
I did a lot with SSIS in my life and I wou... | |
doc_23509935 | require(xts)
require(PerformanceAnalytics)
url <- "http://www.bankofengland.co.uk/boeapps/iadb/fromshowcolumns.asp?csv.x=yes&Datefrom=01/JAN/1975&Dateto=now &SeriesCodes=XUDLUSG,XUDLERG&CSVF=TN&UsingCodes=Y&VPD=Y&VFD=N"
datamat <- read.csv(url)
datamat <- na.omit(datamat)
rownames(datamat) <- as.Date(datamat$DATE... | |
doc_23509936 | public boolean oncreateoptionsmenu(Menu menu) { MenuInflater inflater=getMenuInflater();
inflater.inflate( R.menu.menu, menu); return true}.
This script runs on menu button press, but I also want it to run on my button press. How can this be done? What data is sent to the Menu parameter ( the menu to inflate to)?
Th... | |
doc_23509937 |
A: You can specify the interface and port using the command meteor --port host:port
In your case it would be meteor --port 0.0.0.0:3000.
Type meteor --help to see all tasks. The default task is run. meteor help run will show all options.
| |
doc_23509938 | I'm using MySQL to store all the information and buy and sell orders go to a specific table.
When two users issue simultaneous and immediate buy orders for the same stock, how can I assure that they do not get more shares then those available?
The client connects to a server and the server sends the requests to an RMI... | |
doc_23509939 | I bet, it is pretty common and easy question for pros, and forgotten question for those, who uses frameworks, but I have troubles with understanding how to rewrite my urls using apaches mod_rewrite and .htaccess.
Well, I have no problems to rewrite url like these, where is just one variable:
localhost/eshop/?sect=augl... | |
doc_23509940 | df = pd.DataFrame({
"Date": [
"2020-04-09", "2020-04-09",
"2020-04-10", "2020-04-10", "2020-04-10",
"2020-04-11", "2020-04-11",
"2020-04-12", "2020-04-12",
"2020-04-13", "2020-04-13", "2020-04-13"
],
"ID": [2, 3, 1, 2, 3, 2, 3, 2, 3, 1, 2, 3],
"Value": [1, 1, 1, ... | |
doc_23509941 | SELECT --sysjobhistory.server,
sysjobs.name
AS
job_name,
CASE sysjobhistory.run_status
WHEN 0 THEN 'Failed'
WHEN 1 THEN 'Succeeded'
ELSE '???'
END
AS
run_status,
CAST(
... | |
doc_23509942 | On default, all (4) toggles are true. On selecting one toggle, I want all the other toggles to set to false, while the selected one is true.
I then want to be able to select others to be true to "add on".
My code is as follows:
HTML
<mat-list class="list lt-checkbox" [ngClass]="{'selected-all': allTogglesSelected()}">
... | |
doc_23509943 | string = 'babdbabcce'
dict= {'a':1,'b':1,'d':1}
counter= 0
answer = 0
for i in range(len(string)):
for j in dict:
if string[i] == j:
if dict[j] > 0:
dict[j] = dict[j] - 1
counter+= 1
answer+= counter
# else:
print(ans... | |
doc_23509944 | function MyConstroctor()
{
//what in case when return 5;
//what in case when return someObject;
}
var n = new MyConstroctor();
what n will get in both cases?
Actually its a quiz question, what will be the answer?
What is returned from a custom object constructor?
a)The newly-instantiated object
b)undefined - ... | |
doc_23509945 | Socket socket = new Socket("jeck.ru", 80);
PrintWriter pw = new PrintWriter(socket.getOutputStream(), false);
pw.println("GET /ip/ HTTP/1.1");
pw.println("Host: jeck.ru");
pw.println();
pw.flush();
BufferedReader rd = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String str;
while ((str = rd.re... | |
doc_23509946 | I want to add 180* degrees rotation functionality to my website like in example
The object should be "rotated" using a scroller, like shown in example.
Also, I have to add hotspots to some images.
How can I achive this?
A: Since you have images from lots of angles, it sounds like you can do this in jQuery without 3D ... | |
doc_23509947 | FROM quay.io/keycloak/keycloak:18.0.2 as builder
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_DB=postgres
# Install custom providers
RUN curl -sL https://github.com/aerogear/keycloak-metrics-spi/releases/download/2.5.3/keycloak-metrics-spi-2.5.3.jar -o /opt/keycloak/providers/keycloak-metrics-spi-2.5.... | |
doc_23509948 | @client.event
async def on_member_join(member):
guildID = str(member.guild.id)
if not guildID in banned:
banned[guildID] = []
for i in banned[guildID]:
if member.name in i:
#kick
await kick(user, reason = "Username banned") #ERROR
print("kicked" + str(member.id))
await saveData()
How ... | |
doc_23509949 | filterQuery = (and category_id:97)
and a range:
filterQuery = (or category_id:[97,98])
but not this:
filterQuery = (or category_id:[97,98,135,172])
The API docs are here: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/search-api.html#structured-search-syntax
I think the long-hand way of using (or category... | |
doc_23509950 | ||
doc_23509951 | When I try to open the site a loading animation occurs and after that, the menu and contentt split into either side of the page.
I want only to change content division when I click menu buttons.
These are my routes.php:
Route::controller(Controller::detect());
Route::get('articles', array('uses'=>'articles@index'))... | |
doc_23509952 | So how can I select and highlight text in code itself or programattically ?
A: If you want the link effect you can put the <u></u> on your text in the strings.xml file.
Check this answer for more info: https://stackoverflow.com/a/10019093/3465623
A: Of course you can do it in your code by using SpannableString.
Here... | |
doc_23509953 |
boolean foundMatch = false;
while(!foundMatch) {
foundMatch = Y.equals(X);
if(foundMatch) {
break;
}
else {
Y = useSplitToRemoveLastPart(Y);
if(Y.equals("")) {
break;
}
}
//implementation of useSplitToRemoveLastPart()
private static String useSplitToRemo... | |
doc_23509954 | my_function():
try:
return foo()
except SQLAlchemyError as db_error:
return [db_error, 400]
To raise an error, I did this in my test:
@patch("my_file.foo")
def test_my_function(foo):
foo.side_effect = SQLAlchemyError(Mock())
assert my_function() == I dont know :(
The problem there is t... | |
doc_23509955 | It however seems that the lambda doesn't process large files (moving it back to s3 after unzipping in the lambda). (180MB). We could continue to up the lambda resources (deployed via Laravel Vapor), however, we're looking for an in-memory option that could perhaps provide a streaming way of unzipping.
Is there such a s... | |
doc_23509956 | output, err := abc.Xyz()
if err != nil {
// by convention is `output` always its "zero" value?
}
A: Not always. For example,io.Reader:
Package io
type Reader
type Reader interface {
Read(p []byte) (n int, err error)
}
Reader is the interface that wraps the basic Read method.
Read reads up to len(p) byte... | |
doc_23509957 | I often visit Regex not start with dot or end with dot
Can someone provide this?
A: The following expression should be able to identify invalid characters (based on your example): /^\.|\.$|[\\\/:*?"<>|]/.
*
*^\. - starts with .
*\.$ - ends with .
*[\\\/:*?"<>|] - any of the following invalid characters (note that... | |
doc_23509958 | URL res = this.getClass().getClassLoader().getResource("fileNeededByMyBean.dat");
File file = Paths.get(res.toURI()).toFile();
String absolutePath = file.getAbsolutePath();
....use absolutePath in bean....
In IDE like IntelliJ, project runs fine. But when I try to launch it using 'java -jar app.jar' command, it fails ... | |
doc_23509959 | int main()
{
int b;
int a = (b=5, b + 5);
std::cout << a << std::endl;
}
a has value of 10. What exactly is this way of initialization called? How does it work?
A: This statement:
int a = (b=5, b + 5);
Makes use of the comma operator. Per Paragraph 5.18/1 of the C++11 Standard:
[...] A pair of expressi... | |
doc_23509960 | Something similar to Below But replace First Month and Last Month with the current year data. I have data from 2014 -2017
Sum(
[Ship Date].[Date].CURRENT_MEMBER.FirstMonth
: [Ship Date].[Date].CURRENT_MEMBER.LastMonth,[Measures].[Revenue]
)
A: You may be able to use this structure which I’ve taken from the MSDN YT... | |
doc_23509961 | The designer must support drag & drop element (textbox, button, ...), can group element together and resize the group.
And we can create tab form with this designer.
Is there any component out there (open source or commercial) that enable me to do this?
Thanks.
| |
doc_23509962 |
A: If you are not insistent on using Bluetooth, why don't you try maintaining a service + DB somewhere and make calls there, that way all of your clients can access the data, they just need to hit the right endpoints?
If you are insistent on using Bluetooth, I know firefox has Bluetooth APIs that let browsers use Blue... | |
doc_23509963 | But how do you view the region it's running in after creation?
A: Your datastore region is the same as that of your Google Cloud Platform (GCP) project. The Cloud Datastore documentation provides instructions on how to locate it:
Viewing the location of your project.
A: Originally, Datastore was only accessible from ... | |
doc_23509964 | I.e. in the below examples, for mask matrix #1 I would want to get a:9 since all 9 values in this matrix would superimpose over a values in the background matrix, and for mask matrix #2 I would want a:8, b:8 since 8 of the mask values would superimpose a and 8 would superimpose b.
# background
[['a' 'a' 'a' 'a' 'a' 'a'... | |
doc_23509965 | pip3 install 'django-numpy==1.0'
Collecting django-numpy==1.0
Downloading https://files.pythonhosted.org/packages/a2/15/22ea119379010455ee91c3ee2f76da207fbd342f5277305da3ad660a0a13/django-numpy-1.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<... | |
doc_23509966 | Here is a snippet for the gpu code:
#before iterating over each frame of the video, i define my mat
gpu_mat = cv2.cuda_GpuMat(size, cv2.CV_32FC1)
#iterate over each frame and read the current frame
_, frame = video.read()
blur_frame(frame)
#here is my blur_frame function def
def blur_frame(gpu_mat, frame):
#uploa... | |
doc_23509967 |
A: You should add the following code in the .htaccessfile
where XXXXX is the port number
RewriteEngine On
RewriteRule ^$ http://127.0.0.1:XXXXX/ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:XXXXX/$1 [P,L]
Then you should type in... | |
doc_23509968 | The JSON-reponse looks as follows:
{
"Response":"Success",
"Message":"Coin list succesfully returned!",
"BaseImageUrl":"https://www.cryptocompare.com",
"BaseLinkUrl":"https://www.cryptocompare.com",
"DefaultWatchlist":{
"CoinIs":"1182,7605,5038,24854,3807,3808,202330,5324,5031,178978",
"Sponsored":"1182"
},
"Data":{
"U... | |
doc_23509969 | I am especially paranoid about include files, because I am not 100% sure whether I include C headers or C++ headers.
Some examples I ran into in the past:
*
*trying to use the type bool
*using wrong includes cstdio vs. stdio.h
*trouble with the struct keyword
I just want to make 100% sure that my source is only ... | |
doc_23509970 | John [0775678899] ,Ann [0776789988] ,Mary [0777789900]
But I need to format the string to display it as:
John, Ann, Mary
I tried using the below method but it didn't give me the expected result:
StringTo = StringTo.replace("//[^10] ,/", ", ");
Can someone tell me whats wrong or any other way to compute this?
A: re... | |
doc_23509971 | Here is the code of LazyAdapter (subclass of BaseAdapter)
public class LazyAdapter extends BaseAdapter {
private Context ctx;
private List<ItemDetails> items;
BooksViewHolder booksViewHolder = null ;
public LazyAdapter(Context context, List<ItemDetails> arrayList) {... | |
doc_23509972 | i have this code
<script>
let stateCheck = setInterval(() => {
if (document.readyState === 'complete') {
document.getElementById("MainModal").onblur = function () {
alert("blur event");
};
}
}, 100);
</script>
A: In this case, you want to bind to the 'modal.closing' event t... | |
doc_23509973 | {
"tags": ["a", "b", "c"],
"image": "path/to/thumbnail.png",
"description": "First level description",
"name": "First name",
"another": {
"abcde": {
"label": "one two three",
"description": "Oopsy!"
},
"fghijk": {
"label": "Label ABC :)... | |
doc_23509974 | Even migration tool which can actually translate oDataV3 request to V4 will also work.
| |
doc_23509975 | library(alr3)
M.lm=lm(MaxSalary~Score,data=salarygov)
#Here you will see the R square value
summary(M.lm)
How can I do that?
A: With one predictor you could simply use cor(salarygov$MaxSalary ,salarygov$Score)^2. Alternatively, summary(M.lm)$r.squared.
A: It depend which one you are interested in:
# adjusted R²
su... | |
doc_23509976 | ourClient is an *http.Client - once it is generated, how can TLSClientConfig (which is of type tls.Config{}) alone be changed of this http.Client?
package main
import (
"crypto/tls"
"fmt"
"net"
"net/http"
"time"
)
func main() {
transport := &http.Transport{
TLSHandshakeTimeout: 10 * ti... | |
doc_23509977 |
// List of Amount
for(t=0;t<pname.length;t++) {
newRow = (TableRow) new TableRow(this);
float val1= Float.parseFloat(price);
float val2= Float.parseFloat(rate);
String resultamount = Float.toString(val2- val1);
Double value1 = Double.parseDouble(resultamount);
ilist[a]=(TextVie... | |
doc_23509978 | int main()
{
int a=2;
int *b = &a;
void* c = (void*)b;
printf("\n%d %d %d %d %d %d",a,&a,*b,b,c,*(int*)(c+1));
*(int*)(c+1) = 3;
printf("\n%d %d %d %d %d %d",a,&a,*b,b,c,*(int*)(c+1));
return 0;
}
The output is given below.
2 -1244818996 2 -1244818996 -1244818996 -872415232 ... | |
doc_23509979 | the buyer is the user_id in the order, the seller is the user_id in the product
Quickly:
A user has many products
A product has many postings (to bring products to multiple events)
A post has many orders (other users can order)
Here's my code
class User < ActiveRecord::Base
# Include default devise mo... | |
doc_23509980 | the form needs to submit to this URL:
http://www.mydomain.net/search.php?do=process&forumchoice[]=54&forumchoice[]=53&showposts=0&query=XXXXXXXX
Where XXXXXXX is the user entered value in a text field
how can i do this without using POST ?
A: Change the method attribute in the form, it would look something like
<for... | |
doc_23509981 | But validator told me that it's not proper to put div inside a label tag.
So i tried to put an image tag instead of div..
and it doesn't work properly.
http://jsfiddle.net/dkweb/mtsy33k1/9/
<div class="photo_container">
<label for="file_photo_id">
<img class="preview" src="http://javascript.ru/img/ws_2.png">
<!-- <i... | |
doc_23509982 | After reading this answer I'm should use this formulate:
maximum bytes = key length in bits / 8 - 11
now:
512 Byte = 4096 bit
1024 Byte = 8192 bit
If I use 8192/8-11 it works well but when I use 4096/8-11 get this error: "Invalid key sizes".
Why I can not use 512Byte? Is this a limitation of KeyPairGenerator or wh... | |
doc_23509983 | Looks like I missed some easy configuration, bsc for NSTabViewItems item colors is deprecated by docs, and using current theme...
A: You can't easily adjust the tint of the standard controls. You're going to have to subclass and override the drawing code for each of the elements.
Also, may I humbly suggest that you ... | |
doc_23509984 | CREATE TABLE #TEMP(Id nvarchar(10), dept nvarchar(10))
INSERT INTO #TEMP VALUES('NA', 'cs')
INSERT INTO #TEMP VALUES('1550 ', 'it')
INSERT INTO #TEMP VALUES(' 1665', 'it')
INSERT INTO #TEMP VALUES('NA', 'cs')
INSERT INTO #TEMP VALUES(' 1750 ', 'it')
INSERT INTO #TEMP VALUES('1400', 'cs')
SELECT COUNT(Id), MAX(CAST(Id ... | |
doc_23509985 | Can this be done through a class-level annotation like @GetMe(name = "foobar") ? If yes, how can the name property then be retrieved by the library and used in its Java classes? Is the Java Reflection API a must-use in this case or is there a cleaner way to fetch an annotation's values?
| |
doc_23509986 | I have a link with the id "resentEmailVerificationLink"
I have the following code in my client for when the link is click (alerts are just there to show myself how far the function gets before an error):
Template.dashboard.events({
'click #resentEmailVerificationLink' : function(event) {
event.preventDefaul... | |
doc_23509987 | I manage to do it like this:
From the user to the smart contract in my python script:
#send transaction to the smart contract
web3.eth.sendTransaction({
'to': address,
'from': web3.eth.defaultAccount,
'value': 10000000000000000000
})
And from the smart contract to the user using this function:
function sen... | |
doc_23509988 | What is the best way to check whether a browser supports @supports using only CSS?
I'm currently toying with it by simply checking whether display: block is supported. This method works, obviously, but I'm not sure if this is the most practical approach:
body { background:#fff; font-family:Arial; }
body:after { conten... | |
doc_23509989 | For context, this is to calculate energy usage.
1) I preform various calculations to create the arrays that are passed as arguments for both the old and new energy usage
2) I have a Project object constructor to build a project with the variables that will be shared within all objects.
So I would call it like this:
var... | |
doc_23509990 |
A: WifiManager wifiManager = (WifiManager)this.context.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(status);
also, add permission. You can find the details from here
A: You also need the following permissions in your manifest file:
<uses-permission android:name="android.permission.ACCESS_WIFI_S... | |
doc_23509991 | I want to set condition:
If FriendshipRequest model have from_user = request.user and to_user=self.user, this relationship_to_user fields will return: 'Existed', if not, print 'Not Existed'
Code in Serializers:
class UserDetailSerializer(ModelSerializer):
relationship_to_user = SerializerMethodField()
class Met... | |
doc_23509992 | <complexType name="Example">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="base64bytes" type="xsd:byte"/>
<element name="fileName" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
After... | |
doc_23509993 | I need to add a method to the java.util.prefs.Preferences abstract class, the reasons are as follows:
*
*I have implemented a clusterable preferences implementation and i need to enrich it with more than basic api that java.util.prefs.Preferences provides.
*I do not want to break the usage contract, i.e., a client ... | |
doc_23509994 |
*
*Should I use float or Point?
*Should I pre-compute value of cos/sin/sqrt
http://www.movable-type.co.uk/scripts/latlong-db.html
*My searches are various locations within one city.
*Many OLD posts are telling mysql is not having proper geo support, Is it true with latest MySQL version as well?
A: We are using... | |
doc_23509995 | /** A password hash is stored as `"algorithm$iterations$salt$hash"`
* with the number of iterations optional for some algorithms
When I tried to create a distribution jar for my project, I got this warning:
Variable iterations undefined in comment for...
I tracked the warning down to the trait package scala.tools.n... | |
doc_23509996 | These fields contains an old url that I need to delete altogether.
How can I create a query that will replace all "product_url" fields with data in them witha null value?
A: This will set every product_url to NULL which is currently not null.
UPDATE table_name
SET product_url = NULL
WHERE product_url is not null;
A:... | |
doc_23509997 | I want to use the function by inputing image(grayscale1(imagename))
Also here is my prompt Write a function named “grayscale1.m” that receives a filename for an image file and returns a 3-D array with a grayscale version of the image. It should work for images of any size. Your solution should use nested loops to s... | |
doc_23509998 | So, a bit about the project. I have a Django application that is used to scan check boxes. The application takes a couple of templates from a blank form, which is divided into .png images. The .png images are inside my Pycharm project and they have been uploaded to Docker, because my Docker setting is:
COPY . .
The Dja... | |
doc_23509999 | The XHTML that I am testing this function out on:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="application/xml+xhtml;charset=UTF-8" />
<script src="searcher.js" type="text/ja... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.