id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23525700 | private void OnColumnHeaderMouseClick(object sender, ColumnClickEventHandler e) {
if (e.Row is GridViewTableHeaderRowInfo) {
int index = tabControl1.SelectedIndex;
EditHeader eh = new EditHeader(this.UpdateHeader);
eh.TextBox1.Text = ds.Tables[index.ToString()... | |
doc_23525701 | public void testCreateExcelCSVTracks() throws Exception {
ExcelSystem es = new ExcelSystem();
Graph graph = TinkerGraph.open();
graph.io(IoCore.graphml()).readGraph("tracks.graphml");
if (debug)
LOGGER.log(Level.INFO, graph.toString());
GraphTraversalSource g = graph.traversal();
// es.s... | |
doc_23525702 | I have a page in admin profile (/Profile /admin). But if someone put
http:// ... / Profile/admin
. Happen a jump directly to the admin page without login.
I tried putting:
Route::filter ('/Profile/admin',function ()
{
if (Auth::guest ()) return Redirect::guest ('login');
});
but i dosen't work.
Thanks.
A: Yo... | |
doc_23525703 | Mine is set to False.
show parameters like 'CLIENT_SESSION_KEEP_ALIVE';
But in Snowflake UI on tab Account > Sessions I see my old session, which started almost 2 days ago.
When I check this session in QUERY_HISTORY table, I also see that there were no queries for almost 2 days.
Why my session is not getting killed? W... | |
doc_23525704 | My website works just fine in my computer (using VS2012), but when I tried to upload all the website to HostGator, i'm getting this exception:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Pleas... | |
doc_23525705 | When user access website it should be accessible in language related to domain (com - english, de - german, etc.)
What is the best approach to achieve this? Is Sitecore multisite good for this case?
Thank you!
A: A multisite content tree has to do with separate content. If you have the same content but in different co... | |
doc_23525706 |
A: Solved using the WP Anything Slider plugin!
| |
doc_23525707 | <div id="p">
<div id="c">
</div>
</div>
The parent div has 2 event attached click and dblclick and child div has 1 event attached click. Now my problem is when i clicked on the child div the parent div click event also executed. I tried e.stopPropagation(); but still same behavior. Help me ?
A: You must have tr... | |
doc_23525708 | //in a loop
var cartObject = {};
cartObject.item_name = 'NAME';
cartObject.quantity = number;
cartObject.amount = number;
cartObject.total = cart.amount * cart.quantity;
cartObject.subtotal = cart.subtotal + cart.total;
// store
cartArray[i]=cartObject;
can we directly store like on the f... | |
doc_23525709 | summary-card-with-large-image, but I don't really see the difference.
Example:
<meta name="twitter:card" content="summary" /> <!-- or summary_large_image -->
<meta name="twitter:title" content="Small Island Developing States Photo Submission" />
<meta name="twitter:image" content="https://farm6.staticflickr.com/5510/... | |
doc_23525710 |
A: An ebook or epub is just xhtml with some meta info and stuff. Every page is a xhtml file.
Here is a tutorial on How to Make an ePub eBook by Hand.
A: Many but especially see calibre which can take text in various forms or HTML and convert to epub, mobi etc.
A: For .epub, as others have said, any tool that can ge... | |
doc_23525711 | asd <- structure(list(Company = "Reliance Industries Limited", Symbol = "RELIANCE",
Var.1 = "Sales +", Mar.2018 = "116,915", Jun.2018 = "128,756",
Sep.2018 = "143,323", Dec.2018 = "156,898", Mar.2019 = "139,590",
Jun.2019 = "157,980", Sep.2019 = "149,302", Dec.2019 = "153... | |
doc_23525712 | I want to do this through adb.
Thanks
A: You could use something like this:
adb shell cat /data/misc/bluetooth/bt_config.xml
And you will get an output:
<N1 Tag="Local">
<N1 Tag="Adapter">
<N1 Tag="BluezMigrationDone" Type="int">1</N1>
<N2 Tag="Address" Type="string">5c:51:4f:0e:cc:92</N2>
... | |
doc_23525713 | In HTML page we are giving the input values and in JS file we written some calculation, its output is been display in the HTML. Now, we want to send the output we got in the calculation to the qt C++ file or QML file.
| |
doc_23525714 | D || month || year || No of Sales
Jan-18 || 01 || 2018 || 231
Now, I am running a query to query to check for this record but, I am getting no output.
SELECT * FROM mytable
WHERE [year]=left(CONVERT(VARCHAR(8),DATEADD(mm,-1,DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)),112),4)
AND [month]=left(CONVERT(... | |
doc_23525715 | data=cursor.fechall
for item in data:
if item["article"]==articledesc:
do something
break
is there a way to access the element of the dictionary created directly, without having to iterate over all the elements with a for loop
thanks
A: If you only require a single article, then change your ... | |
doc_23525716 | Any Ideas?
| |
doc_23525717 | More precisely, at the beginning of an operation on an object, a lock file corresponding to the name of the object and the type of operation being done would be created.
Example: at the beginning of myOperation on myObject, lck/myObject/myOperation object would be looked for and created if it does not exist.
This "lock... | |
doc_23525718 | Desired FFT ouptut.Checked using ImageJ
#include "CImg.h"
using namespace cimg_library;
int main(int argc, char * argv[]) {
const char * input_file = "Lenna.png";
CImg<unsigned char> * input = new CImg<unsigned char>(input_file);
//resize_fft(*input); //Resize the image for the FFT
//CImg<unsigned c... | |
doc_23525719 | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static Logger log = LoggerFactory.getLogger(myfile.class);
Now, I put the slf4j-api-1.6.4.jar & slf4j-simple-1.6.4.jar in classpath & code compiles fine but where is it logging all the information????
I've log.info("test"); but its not creating any log ... | |
doc_23525720 | class myVC:UIViewController {
let myButton = MyButton()
func viewDidLoad()
{
view.addSubview(myButton)
myButton.addTarget(myMethodClosure) // ***
}
func myMethodClosure() // I guess this method captures self strongly when im using it as a closure, tell me if im wrong
{
... | |
doc_23525721 | interface front_port #(parameter DATA_WIDTH = 4);
logic [DATA_WIDTH - 1 : 0] data;
logic acknowledge;
modport f_interface(input data, output acknowledge);
endinterface
interface front_interface #(parameter NO_OF_IN_PORTS = 3);
front_port front_ports[NO_O... | |
doc_23525722 | What is the best approach?
Should I make a PHP-script that responds with a JSON encoded array with all list items or should I make an XML-file that generates each time the data in the DB changes that I import to the app each time it starts? or any other good way to do it?
Since all stuff are made by XML-files in andro... | |
doc_23525723 | I did some Excel data checking using basic IF and some operators. And I encountered an issue that give me inconsistency in the result. I'm checking is:
1.24 = 66.64 - 65.4
Below is the formula I used and the result should be mathematically EQUAL, but it gives me NOT EQUAL:
=IF(1.24 = 66.64 - 65.4, "EQUAL", "NOT EQUA... | |
doc_23525724 | Currently my setup is the following:
Two projects - WPF and a Console App. The WPF is everything frontend, while the console is the database access.
The WPF window has textboxes and a button. The textboxes are used as the filters for the LINQ .Where() while the button has an ICommand bound to it. The command calls a me... | |
doc_23525725 | <div id="id11t" style="position: relative; width: 1022px; height: 446px;">
Thanks
A: $('#id11t').css({
width: "300px",
height: "200px"
})
A: $("#id11t").css('width', '1022px');
$("#id11t").css('height', '1022px');
Will resize your div to 1022x1022
A: $('#id11t').width(X);
$('#id11t').height(Y);
| |
doc_23525726 | from time import sleep
i = tf.constant(0)
x = tf.constant(10)
r = tf.add(i,x)
# Use at most 10% of gpu memory, I expect this to set a hard limit
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=.1)
# sleep is used to see what nvidia-smi says for gpu memory usage,
# I expect that it will be at most 10% of... | |
doc_23525727 | I call the function as such:
NewText = My_Replace(OldText, "sample text", """)
This function will look for an occurrence of "sample text" and find the first " that appears, and remove this piece from the string.
Problem is, how do I pass " to the function as this is the other end of the string I am trying to cut.
Than... | |
doc_23525728 | How do I escape comma in JSON tag in Go?
type AA struct {
MyStr string `json:"sub,ject"`
}
func main() {
jsonStr := `
{
"sub,ject": "I"
}
`
stt := new(AA)
json.Unmarshal([]byte(jsonStr), stt)
fmt.Println(stt)
t, _ := strconv.Unquote(jsonStr)
fmt.Println(t)
}
This does not grab the key... | |
doc_23525729 | If identified a status other than the listed above must fail the test.
I could find chai validating only one status in a unit test (like below)
res.should.have.status(200)
res.should.have.status(200)
But I'm expecting a statement like below or any other equivalent.
res.should.have.status([200, 401, 403]);
Plea... | |
doc_23525730 |
A: well, the statement of
switch scenes in Android will be as efficient as Activity
will make no sense, because, In unity3d, there is only one activity com.unity3d.player.UnityPlayer there, and the efficiency of switching between scenes depends on how many resources and other staff will be loaded, and if switching ... | |
doc_23525731 | $ rails generate model -h
Usage:
rails new APP_PATH [options] ...
I should be able to get help with all of the different rails commands on the console. Any suggestions?
Thanks.
A: Doh! I was in the wrong directory and/or I hadn't generated a new project yet.
It's working fine now, thanks.
| |
doc_23525732 | Specifically, I want the discount_code to be selectable.
<div style={styles.discountContainerCode}>
<div style={styles.titleRowCode}>
<div style={styles.discountRowTitle}>Code</div>
</div>
<div style={styles.codeRowBox}>
<div style={styles.code} >{this.state.discount_code}</div>
</div>
<div style={st... | |
doc_23525733 | Then it redirects to the logout controller. I have added a if statement agent->is_referral to the logout controller and set flashdata. Because it has been redirect from dashboard controller it should pick up that if statement and set flashdata but does not.
Question: If the customer is redirected from whatever control... | |
doc_23525734 | location ~ blabla {
return 404;
}
/upload/a.jpg => must be returned 404,
/upload/a.jpg?letmein => must be OK.
any idea ?
| |
doc_23525735 | How do you do this for a custom dependency property for your custom control? I want it to work just as it does for standard element dependency properties with the IntelliSense help and all.
Thanks
A: If they won't change at run time, the answer is enum. If they do change, the way I do them is with strings (or objects ... | |
doc_23525736 | driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().setScriptTimeout(60, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
However none of them seem to be honoured. If i understand correctly, setScriptTimeout should throw an error if there is n... | |
doc_23525737 | So when they
async def on_message(message):
if message.content.startswith('$greet'):
await message.channel.send('Say hello!')
msg = await client.wait_for('message', check=check)
print(message.content)
When I run the code and message $greet to my bot, it will reply with Say hello!, when I ... | |
doc_23525738 | Thanks for the help
A: for the website, you need same database which is being used on the web. For example, if you add some information using your app, it will make changes in your website also. About the Facebook part, Can you be more specific what are you trying to do with Facebook page?
A: Facebook provides read o... | |
doc_23525739 | it.onNext(0)
Thread.sleep(500) // 500ms
it.onNext(500)
Thread.sleep(600) // 1100ms
it.onNext(1100)
Thread.sleep(600) // 1700ms
it.onNext(1700)
Thread.sleep(1200) // 2900ms
it.onNext(2900)
Thread.sleep(200) // 3100ms
it.onNext(3100)
Thread.sleep(200) // 3300ms
it.onNext(3300)
Thread.sleep(800) // 4100ms
it.onNext(4100)
... | |
doc_23525740 | Problem is that I am getting date only from UI in this format 2016-10-08 which is of type string. But in the database, I have a column which is of type datetime in this format 2016-10-08 17:38:00.000.
I am using this query to search but it does not work.
select *
from table
where acceptedDate like @sDate+ '%';
where... | |
doc_23525741 | I would like to imitate going into the Wifi Settings but actually without doing this.
Just wondering if there is any method in SystemConfiguration.framework or in CFNetwork.framework which could do this happen?
Of course turning Wifi off and on via SBWiFiManager is not the way, it is not going to be accepted by Apple a... | |
doc_23525742 | def get_tags(self):
if self.args.range in self.date_range_mapping:
response = self.ce.get_tags(
TimePeriod={
"Start": self.date_range_mapping[self.args.range],
"End": self.today,
},
TagKey='custom_tag_1',
... | |
doc_23525743 | //-- on 'Begin Request' --
var identity = HttpContext.Current.User.Identity;
if (!identity.IsAuthenticated)
throw new UnauthorizedAccessException();
var user = //lookup user in Db using identity.Name
new UserScope(user) //store this somewhere(?)
//-- on 'End Request' --
var scope = //get user scope
scope.Dispose(... | |
doc_23525744 | From the describe of C++ premier 5th, chapter 7 section "Type Names Are Special", below is the snippet code from the book. from its comments cannot redefine Money, does it mean the compiler is not allowed to redefine the type name? Thanks
/*copy from the book*/
typedef double Money;
class Account {
public:
Money ba... | |
doc_23525745 |
A: Is this Asp.Net? If so you can check out the following web-parts: http://msdn.microsoft.com/en-us/library/e0s9t4ck.aspx
A: You can achieve this in different ways in different platforms ...
But they all use advanced levels of javascript and css manipulation ...
in ASP.NET for example there is a great example calle... | |
doc_23525746 | When I type "http://localhost:3000/events/7.json" in URL, it works.
But when I type "http://192.168.56.73:3000/events/7.json" it shows "connection refused".
How to solve this?
A: Rails only listens to localhost (127.0.0.1) by default. You'll need to specify what IP you want the rails server to listen to if you want it... | |
doc_23525747 |
*
*when dealing with raw memory or
*when you may have to return null or
*when you are dealing with the returned newly allocated object from new().
The first cannot really be handled. It's intrinsic in the task.
The second can be handled by a Null object pattern, and return a reference to that Null object. It r... | |
doc_23525748 | public static string TileString(int x, int y, int z)
{
int[] tileInts = { x, y, z };
string tileString = string.Join("/", tileInts);
return tileString;
}
The method is residing in a class with some functionality getting images from a database, and I want to u... | |
doc_23525749 | Here is the Code i am Using to Calculate.
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
DateTime now = DateTime.Now;
DateTime givenDate = DateTime.Parse(DOB);
int days = now.Subtract(givenDate).Days;
int age = Math.Floor(days ... | |
doc_23525750 | Is there any way to do this natively or more elegantly than:
*
*Create public synonym for materialized view and make everything that uses the view use the synonym instead.
*Create new materialized view with new SQL
*Change the synonym to point to the new view
*Drop the old view.
I've got code to do this dynamic... | |
doc_23525751 | import cl.cukes.ParameterizedRunnerFactory;
import cl.test.AutomatedWebTest;
import cl.util.report.Report;
import cucumber.annotation.en.Given;
import cucumber.annotation.en.Then;
import cucumber.annotation.en.When;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
import org.junit.runner.Runner;
imp... | |
doc_23525752 | getTypeB(id: String,
valA1: TypeA = defaultA1
valA2: TypeA = defaultA2,
valA3: TypeA = defaultA3 ) : TypeB {}
I know using named arguments I can call the above function with only some of the vals, like
getTypeB(id,
valA2 = someValueOfTypeA )
My question is, is here any way for the... | |
doc_23525753 | You see, the following json object is what I'm currently getting with my code, and it has the information I need, however it is very convoluted, I only need an array of Cursos which is a property of the CursoUnidade object.
"cursos": [
{
"cuuCurId": 1,
"curso": {
"curId": 1,
"curDescricao": "Analise e Desen... | |
doc_23525754 | Now, i need to read all those resource values from that global.resx file and store them in a ViewBag so that i can access ViewBag value in mvc views.
I dont want to read the value using Resource.getValue(key,culture) option because that will make me to hard-code all the keys in the code, but instead i want to read all... | |
doc_23525755 | <script>
function finalCost(){
var roomType = document.getElementById("roomtype").value;
var roomNum = document.getElementById("rooms").value;
var personNum = document.getElementById("atoma").value;
var childNum = docume... | |
doc_23525756 | Wrapping the .rkt in a shell script which waits and then does the cleanup is a bit too hacky for me. There are many exit handlers in the Racket documentation (exit-handler etc) but none of them seem to work!
A: You probably want to augment on-close in frame%, for example:
#lang racket/gui
(send
(new (class frame% (s... | |
doc_23525757 |
A: IMO, you should have a DAO interface created for your db activities/operations. This DAO interface will have generic operations for storing/retrieving data. You can then have classes implement this DAO interface; one class would enabled database persistence, one class would enabled text file based persistence (in c... | |
doc_23525758 | @Html.DropDownList("DepartmentId", "Select a Department:", htmlAttributes: new { @class = "form-control" })
I'm getting errors because it says:
does not contain a definition for 'DropDownList' and the best extension method overload 'System.Web.Mvc.Html.SelectExtensions.DropDownList(System.Web.Mvc.HtmlHelper, string, S... | |
doc_23525759 |
A: You can try hack into the webview css and try change its width to your screen width / 2.
A: I've finished with following snippet, which completely works:
[aWebView loadRequest:aRequest progress:nil success:^NSString *(NSHTTPURLResponse *response, NSString *HTML) {
NSMutableString *mutableString = [[NSMutableSt... | |
doc_23525760 | const createFile = async (req, res, next) => {
const errors = validationResult(req);
if (!errors.isEmpty()) {
return next(
new HttpError('Invalid inputs passed, please check your data.', 422)
);
}
const { userId, Dataset } = req.body;
const createdFile = new File({
userId,
Dataset,
}... | |
doc_23525761 | int x = 10;
if(x<1)
cout<<"done";
else
for(int i=0;i<n;i++){
cout<<"done";
}
i know that in this case we will choice the higher complexity of both of them and it will be big(O) which is O(N)
but what about if i use else if is it will be the same as i think of above code ?
int x = 10;
if(x<1)
cout<<"done";
... | |
doc_23525762 | Here's the relevant code...
EDIT : To show adding of items to the list via another thread.
private void backgroundWorker4_DoWork(object sender, DoWorkEventArgs e)
{
// Get the BackgroundWorker that raised this event.
BackgroundWorker worker = sender as BackgroundWorker;
// Number of interva... | |
doc_23525763 |
*
*Creates project file, if it exists it removes it and creates new one.
if [ -f projekt ]
then
rmdir projekt
mkdir projekt
else
mkdir projekt
fi
*Reads file name, if it exists it asks for new one as long as you give proper name. Then i need to use that name but i figured it out. I want to create file in ho... | |
doc_23525764 | render(){
if(//loading){
return ( <div>loading</div>);
}
else{
if(//has results){
return (
this.props.reducer.results.map((result, i) => {
return <Result key={'credit-card-result-' + i} >{result}</Result>;
})
... | |
doc_23525765 | each movie in movies
.col-md-3(style="margin-bottom: 20px;")
.text-center
img(src= "#{movie.Poster}" style="width:100%; height:200px; padding: 0px 40px;")
h5(style="padding: 5px 40px 0px 40px;") #{movie.Title}
h5 #{movie.Year}
A: If y... | |
doc_23525766 | It's pretty trivial to fetch 2 feeds but it turns out that the feeds are just concatenated together and not merged.
Here's the sample code.
select channel.title,channel.link,channel.item.title,channel.item.link
from xml where url in(
'http://code.flickr.com/blog/feed/rss/',
'http://feeds.delicious.com/v... | |
doc_23525767 | JS
<button class="upl-btn" data-url="validacao/upload/planilha/55163343b0df070bbc66e1bb6e0c3f9b.xlsx" data-type="DELETE">
<span>Apagar</span>
</button>
API
@RestController
@RequestMapping("/validacao/upload/planilha")
@Api(hidden = true, value = "/planilha", description = "API para envio de planilhas para validação"... | |
doc_23525768 | For those of you who are already the Xcode 9 Beta, are you experiencing any difficulties working on your previous projects?
That might be a trivial questions but I had issues in the past when updating Xcode, hence why I ask this time.
A: [edit]: it is now safe to upgrade to Xcode 9 (and Swift 3.2 or Swift 4) for rele... | |
doc_23525769 | Let's imagine a website page that displays a filtered products list :
*
*If I request /products?foo=bar in my browser, I get a full page wrapped in a layout, the layout contains a header with a form allowing to change search criterias.
*If I change foo value to baz and submit the form, it reloads dynamically the re... | |
doc_23525770 | <Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="65" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<MyControl x:Name="leftControl" Grid.Column="0" />
<MyControl x:Name="rightControl" Grid.Column="2" />
</Grid>
The custom cont... | |
doc_23525771 | The answer for London should be: £496.33 but having tried various sumifs / countifs I cannot get it to work.
A: You probably need COUNTIFS which -- similar to the SUMIFS you are already using -- allows to define multiple critera and ranges.
So, if the column R contains the values, you want to build the average upo... | |
doc_23525772 | function startInterval() {
checkInt = setInterval(function() {
$("#queueOrderList").load("updateQueueList.php function() {
console.log("Load was performed");
});
}, 100)
}
This is my code and it makes 10 requests per second.
| |
doc_23525773 | /var/www/default/index.php
which is symlinked to
/var/www/mysite/index.php
However when i call DIR from mysite the path resolves to the origial path under default. How do i make it return the mysite path (the symlinked folder, not the actual folder)
A: If you want to get the current path with symlink you can ask you... | |
doc_23525774 | I am guessing that this is a problem with node js not loading the javascript content, then executing it. I can SEE the javascript in the response, though it never loads the content that the javascript files are producing in the html.
What I mean is, it doesn't actually execute the javascript. How would I make node js ... | |
doc_23525775 | private IEnumerable<object> prepareData()
{
var data = from res in Globals.ds.Tables[0].AsEnumerable()
.GroupBy(x => new
{
art = x.Field<string>("artiste"),
alb = x.Field<string>("album"),
})
... | |
doc_23525776 | @Document
public class Dog {
@Id
private ObjectId id;
private String owner;
}
@Document
public class User implements UserDetails {
@Id
private ObjectId id;
private String username;
}
These documents are persisted using spring-data-mongodb and exposed using spring-data-rest. User is authen... | |
doc_23525777 | ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new NetworkCredential("****", "*****", "*****");
service.Url = new Uri("https://******/ews/exchange.asmx");
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
... | |
doc_23525778 | This List contains objects which themselves contain objects, and so on ... (all objects are of the same type)
My objects looks like that :
public class MyObject (...)
{
...
public MyObject[] Object;
...
}
I'd like to change some variables of these objects (according to certain parameters), and to do ... | |
doc_23525779 | npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: events@0.0.1
npm ERR! Found: @angular-devkit/build-angular@0.1000.8
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1000.5" from the root project
npm ERR!
npm ERR! Could not resolv... | |
doc_23525780 | Model
.findOne({_user: req.user._id, name: req.params.name})
.sort({'music.vote': -1})
The data looks like this, I want to order the array of musics by vote DESC
{
"__v": 2,
"_id": "5492bfaf59c17bdead8363c6",
"_owner": "5491e02a9f5418da92bfb4e6",
"cre... | |
doc_23525781 | Error:Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
2015-12-29 18:57:09,522 [4021913] INFO - .BaseProjectImportErrorHandler - Failed to import Gradle project at 'D:\Android\ASProjects\Sunshine-Version-2-1.01_hello_world'
org.gradle.tooling.GradleConnectionException: Cou... | |
doc_23525782 | I want to create an index on a and b, these are the two options I can go ahead with
*
*indexing a and b separately
*creating index as (c,a) and (c,b)
Will creating index in the 2nd form optimize the performance of db? And how does indexing work in that case?
A: An index can only be efficiently used by a query if a... | |
doc_23525783 | I've created another Console project which references Core. In my Main() I've got some calls to stuff inside the Core but I'm getting an error:
The type or namespace name 'Core' does
not exist in the namespace
'XXXX.Tasker' (are you missing an
assembly reference?)
The only thing I can think of is that the fact... | |
doc_23525784 | public ClassToTest : IClassToTest
{
private readonly DBRepository rep;
public bool MethodA()
{
//Some logic
var result=MethodB();
//Do some logic against result;
}
public ResultType MethodB()
{
return Rep.GetResult();
}
}
If I want to Unit testing MethodA, w... | |
doc_23525785 | from Bio.Blast import NCBIWWW
from Bio import Entrez, SeqIO
Entrez.email = "A.N.Other@example.com"
handle = Entrez.efetch(db="Protein", id= "75192198", rettype = "xml")
record = Entrez.read(handle)
I get back a "Bio.Entrez.Parser.DictionaryElement" that is really difficult to search through. If I want to say get the t... | |
doc_23525786 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpcwebcfx", "dpcwebcfx.vcproj", "{355F3EB4-3B37-4272-B454-340E9B3BD9D3}"
to
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpcwebcfx", "dpcwebcfx.dsw", "{355F3EB4-3B37-4272-B454-340E9B3BD9D3}"
Now I get an error converting the dsw file: Cannot load the proje... | |
doc_23525787 | Stacktrace:
java.lang.RuntimeException: Unable to destroy activity {com.stech.ebox_expenses/com.example.ebox_expenses.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
FATAL EXCEPTION: main
Process: com.stech... | |
doc_23525788 | #!/usr/bin/env perl
use strict;
use warnings FATAL => 'all';
use feature 'say';
use autodie ':all';
use DDP;
no autovivification;
my %h = (
'a' => 1,
'b' => 2,
);
p %h; # pretty print the original hash
my @fake_keys = ('x', 'y', 'z');
if (grep {defined} @h{@fake_keys}) {
say "found fake keys";
}
p %h; # s... | |
doc_23525789 | <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/Scripts/jqplot-plugins/excanvas.js"></script><![endif]-->
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/Scripts/html5.js"></script><![endif]-->
Edit
Right, had a coffee break and blew off some steam. Looked at the... | |
doc_23525790 |
Foreign function calls to a different package: .Fortran("cinc", ...
PACKAGE = "cmprsk") .Fortran("crstm", ... PACKAGE = "cmprsk") See
the chapter 'System and Foreign language interface' of the 'Writing R
Extensions manual.
How do I get rid of this NOTE? I can't find the answer from either reading the chap... | |
doc_23525791 | Can't locate XML/Twig.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/loc al/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/li b64/perl5 /usr/share/perl5 .) at sign.pl line 12.
BEGIN failed--compilation aborted at sign.pl line 12.
A: The error is due to a missing Perl module.
S... | |
doc_23525792 | My colab kernel restarted itself for unknown reasons when I tried to plot my data with matplotlib plot (right before which, I had successfully plotted histograms for the same data). The colab gave a notification to check the runtime logs, which are as follows. I don't see any apparent reason why this happened.
A: I ju... | |
doc_23525793 | i try this below code for sharing google plus
<a href="https://plus.google.com/share?url=<?php echo
rawurlencode('https://www.songdew.com/flash/songdewplayer_new.swf?plyr_songid=6428&
Mybasepath=https://www.songdew.com/&MyTxt=Eclectica&MyImg=https://www.songdew.com/files
/2510/tracks/waveforms/51d5167897bcd2db4fb7fd1... | |
doc_23525794 | What I want to achieve is list of all interfaces implemented by a class, but without derived interfaces (and interfaces implemented by derived classes).
Here's an example to illustrate (from LinqPad, .Dump() is a printing to result window):
void Main()
{
typeof(A).GetInterfaces().Dump(); //typeof(IT), typeof(IT... | |
doc_23525795 | I have this as part of my template.
{% for menu_item in menu %}
<li class="single-link"><a href="{{ menu_item.url }}" title="{{ menu_item.caption }}">{{ menu_item.caption }}</a></li>
{% endfor %}
The context passed to this tag contain
context['menu'] = {'keywords': {'url': '#', 'caption': 'test'}, 'start': {'url'... | |
doc_23525796 | Parent has an @Id and a @Version.
For each parent (id and version as FKs) there are multiple children.
@Entity
@Table(name = "parent")
public class ParentDao implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "parent_id")
private Long parentId;
@Version
... | |
doc_23525797 | Project1
References
MyBrandedAssembly.dll (namespace: MyAssembly)
Project2
References
Project1
When MsBuild built Project1, it could resolve the MyAssembly namespace to MyBrandedAssembly.dll:
Primary reference "MyAssembly".
Resolved file path is "SolutionPath\Binaries\MyBrandedAssembly.dll".
Reference ... | |
doc_23525798 | import pandas as pd
import dask.dataframe as dd
data_path = 's3://bucket/prefix'
df = pd.DataFrame({'lines': [0, 0, 1, 1], 'area': [1, 1, 20, 20], 'values': [0.1, 0.2, 1.1, 1.2]})
dd.from_pandas(df, npartitions=2).to_parquet(data_path, partition_on=['lines', 'area'])
This generates a directory structure in s3 like t... | |
doc_23525799 | Here is the plnkr.
I know that none of the data will load because of this coming from an internal SharePoint list, but the views should at least load something to give us an idea of what is going on.
Edit: I cannot actually answer this since my account is too new, but I needed to move the ng-template script blocks insi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.