text:
Q: Android: How to unicast an intent to an Activity with inner BroadCastReceiver? I have 2 Activities that need to communicate with each other: ActivityA and ActivityB
Say that ActivityA opens ActivityB. How do I unicast a message from ActivityB to ActivityA without closing ActivityB?
Here's what I tried:

*

*setResult() - but the intent will
be delivered only when ActivityB
closes

*sendBroadcast() - but this sends the
    intent to everyone listening to the
    action. I only want the action to
    reach ActivityA since it spawned
    ActivityB. I tried having ActivityA
    registering a BroadCast receiver,
    but I cannot target that via
    Intent's SetComponentName().

*startActivity() - this brings up
    ActivityA, which I don't want

A:
I have 2 Activities that need to communicate with each other: ActivityA and ActivityB

You think they need to communicate with each other. I'd argue that, other than startActivityForResult()/setResult() pattern, ActivityB should not be communicating with ActivityA. Instead, they should be working through something else (e.g., service) that represents your model.

How do I unicast a message from ActivityB to ActivityA without closing ActivityB?

Use your option #2 and setPackage() to constrain the delivery.


text:
Q: Dropdown for selectInput() is being masked by surrounding div I have created below Shiny template to demonstrate the issue that I am facing to fully display selectInput()
library(shiny)

ui = shinyUI(
        fluidPage(
            div(
                div(style = "margin-top: 110px;",
                wellPanel(
                        column(12, style = "background-color:WhiteSmoke; height:123px; margin: 0; padding: 0;",
                            splitLayout(cellWidths =  c('60%', '30%'),
                                div(id = 'bb', style = "background-color: #e8e8e8; border-radius: 5px; padding: 20px 0px 10px 20px;",
                                    splitLayout(cellWidths =  c('55%', '40%'),
                                        div(id = 'aa', style = "z-index: 20000;",
                                            selectInput(inputId = "Pick", label = "Chose", choices = c('A', 'B', 'C'),
                                                                                selected = NULL, multiple = FALSE, selectize = TRUE, size = NULL, width = 300))

                                    ))))

                    )
            )
    )))

server = function(input, output, session) {
    }

shinyApp(ui = ui, server = server)

As you see when I click on the drop down for selectInput(), entire element is not getting displayed, it is being masked by surrounding div.
Any idea how to resolve this problem would be highly appreciated. I tried with adjusting z-index, however could not succeed.
Thanks,

A: To consider the question "complete", you could remove the splitLayouts as I mentioned in my comment:
library(shiny)

ui = shinyUI(
        fluidPage(
            div(
                div(style = "margin-top: 110px;",
                wellPanel(
                        column(12, style = "background-color:WhiteSmoke; height:123px; margin: 0; padding: 0;",
                                div(id = 'bb', style = "background-color: #e8e8e8; border-radius: 5px; padding: 20px 0px 10px 20px;",
                                        div(id = 'aa', style = "z-index: 20000;",
                                            selectInput(inputId = "Pick", label = "Chose", choices = c('A', 'B', 'C'),
                                                                                selected = NULL, multiple = FALSE, selectize = TRUE, size = NULL, width = 300))

                                    ))

                    )
            )
    )))

server = function(input, output, session) {
    }

shinyApp(ui = ui, server = server)

redpajama_set_name: RedPajamaStackExchange


text:
Q: MongoDB 2.6 geospatial $near query behavior changed on compound index? I have been running a geospatial query using a compound index.
After upgrading to MongoDB 2.6, the order of the result set has changed such that the results are no longer being sorted by distance for the following query:
db.properties.find({
    "address.uppercase": { "$regex": "^14529" },
    "address.location": {
        "$near": {
            "$geometry": {
                "type": "Point",
                "coordinates": [ -122.2103, 47.6154 ]
            }
        }
    }
})

The index on the properties collection is configured as:
{ "address.uppercase": 1, "address.location": "2dsphere" }

In 2.4, the query returned all addresses where "address.uppercase" starts with "14529", ordered by the address distance from location [ -122.2103, 47.6154 ].
After upgrading to 2.6, the same query now returns all addresses ordered by "address.uppercase".
Is there a way to specify the sort order of the results to be based on the geospatial portion of the query?

A: Sorry but I do not see that behavior. With the example documents:
{
    "address" : {
        "uppercase" : "14529",
        "location" : {
            "type" : "Point",
            "coordinates" : [ -100.2014, 47.6154 ]
        }
    }
},
{
    "address" : {
        "uppercase" : "90210",
        "location" : {
            "type" : "Point",
            "coordinates" : [ -120.2014, 47.6154 ]
        }
    }
},
{
    "address" : {
        "uppercase" : "14529",
        "location" : {
            "type" : "Point",
            "coordinates" : [ -120.2014, 47.6154 ]
        }
    }
}

And with the query:
db.address.find({
    "address.uppercase": { "$regex": "^14529" },
    "address.location": {
        "$near": {
            "$geometry": {
                 "type": "Point",
                 "coordinates": [ -122.2103, 47.6154 ]
            }
        }
    }
})

I get these in order of nearest :
{
    "address" : {
        "uppercase" : "14529",
        "location" : {
            "type" : "Point",
            "coordinates" : [ -120.2014, 47.6154 ]
        }
    }
},
{
    "address" : {
        "uppercase" : "14529",
        "location" : {
            "type" : "Point",
            "coordinates" : [ -100.2014, 47.6154 ]
        }
    }
}

And even with regressing the index type. Perhaps try dropping the index and re-creating it and see of you can reproduce. Otherwise if you possibly have an edge case example that does not fit these conditions, then your question could do with an edit to include the required detail.

A: The bug has been confirmed to occur with a compound multi-key 2dsphere index. I.e. It will only exhibit itself if one of the documents in the collection have more than one value (i.e array) for one of the fields defined by the index.
10gen will be releasing the fix in MongoDB 2.6.2. See: https://jira.mongodb.org/browse/SERVER-13687


text:
Q: Getting an array from a SOAP server in PHP first things first. Im a n00b. I'm starting to do things in PHP, getting the basics and all. Anyway i need to do this, although im aware it's not within my current knowledge.
I've managed to interact with a SOAP server sending data in the form of an object, and receive a single string or things like this. But i can't receive an Array...
Here's my code.
class cUSER {
        public $LOGIN;
        public $PASS;
}

$pcUser = new cUSER;
$pcUser->LOGIN = "user";
$pcUser->PASS  = "pass";

try {
    $client = new SoapClient("http://servername.es:8200/SOAPSERV.asmx?wsdl", array('features' => SOAP_SINGLE_ELEMENT_ARRAYS));

    //var_dump($client->__getFunctions());
    $cACCESORIO =  $client->GET_ACCESORIOS($pcUser);

} catch (Exception $e) {
    echo '', $e->getMessage(), "\n";
    die();

}

And here is the specifications i received from the server developer:

GET_ACCESORIOS Need a User objec as param. Gives back an array of the object. Gives back an object:
REFERENCIA (model id)
  MODELO (model name)
  PVP (price)
  HasError (Shows if an error has ocurred)
  ERROR (error description)

SERVER REPLY IS:

Server was unable to process request. ---> Object reference not set to
  an instance of an object.

I've tried several things, help!!!

A: never mind, the server documentation was wrong. and since i'm a noob i accepted the error was on my side. It seems like the server developer is id**t.
thanks anyway


text:
Q: Adding +1 day to jQuery datepicker I have a jQuery datepicker working, outputting to an altField in TIMESTAMP format. I'd like to add +1 day to the altField in order to encompass the day selected (but not show the +1 in the UI). I can't figure out how to implement this. My code looks like this:
$('#end_date').datepicker({
    inline: true,
    altField: 'input[name="event_start_date_max"]',
    altFormat: '@',
    onSelect : function(dateText, inst) {
        var epoch = $.datepicker.formatDate('@', $(this).datepicker('getDate')) / 1000;
        $('input[name="event_start_date_max"]').val(epoch);
    }
});

If anyone can help out I'd appreciate it.

A: I fiddled a solution here for you. Basically you can add 86400 or (60*60*24), as I did here below:
$('#end_date').datepicker({
    inline: true,
    altField: 'input[name="event_start_date_max"]',
    altFormat: '@',
    onSelect: function(dateText, inst) {
        var epoch = ($.datepicker.formatDate('@', $(this).datepicker('getDate')) / 1000) + (60 * 60 * 24);
        $('input[name="event_start_date_max"]').val(epoch);
    }
});


text:
Q: finding all dependencies in a verilog compile I'm trying to cheaply and accurately predict all the SystemVerilog dependencies for a build flow. It is ok to over-predict the dependencies and find a few Verilog files that aren't sv dependencies, but I don't want to miss any dependencies.
Do I actually have to parse the Verilog in order to determine all its dependencies?  There are tick-include preprocessor macros, but those tick-include don't seem to load all the code currently getting compiled. There is a SYSTEM\_VERILOG\_PATH environment variable.  Do I need to parse every SystemVerilog file in that SYSTEM\_VERILOG\_PATH variable in order to determine which modules are defined in which files?

A: One good way (if this is synthesizable code) is to use your synthesis tool file list (e.g. .qsf for Altera).  That tends to be complete, but if it isn't, you can look at the build log for missing files that it found.

A: From a readily compiled environment it is possible to dump the source files
(e.g. Cadence
-- To list source files used by the snapshot 'worklib.top:snap'
% ncls -source -snapshot worklib.top:snap

)
but if you are starting from scratch I am afraid there is no easy solution. I would go for the pragmatic one: have a config file with all the directories that contain .sv files and then compile everything in it. If your project has a proper file structure, you could also modularize this by supplying config files for every major block.
Hope that helps.

A: I know Questa has a command line option where it will generate a makefile for you with all the dependencies in it after you have compiled your design.  I'm not sure if the other simulators have that.
Another option is to browse and dump your compiled library in your simulator.  You probably won't get the actual filenames the modules are compiled from, but it'll be a lot easier to parse all your verilog files for the module names that show up in the compiled library.


text:
Q: Why Java 7 release not available after jdk-7u80? I want to download JRE 1.7.0_131-b31 as i read its support TLSv1.2 by default

TLSv1.2 and TLSv1.1 are now enabled by default on the TLS client
end-points. This is similar behavior to what already happens in JDK 8
releases.

But Oracle site showing latest version of jdk-7u80 and after this release no other Java 7 version available.

*

*Is this because ,user have to buy license/paid version ?

*These version not available for individual developer ?

A:
Why Java 7 release not available after jdk-7u80?

Because of Oracle business reasons.  Free public support ended in April 2015.
(Backporting patches and so on requires a team of people.  That costs money.  Oracle is a commercial enterprise.   And other reasons.)

Is this because user have to buy license/paid version ?

Yes.  You need an Extended Support Contract to use versions after 7u80

These version not available for individual developer ?

No.
If you or your client requires Java 7 with TLSv1.1 and later, your options are:

*

*Upgrade to Java 8 or (better) 11. This is the best option.

*Use a 3rd-party JCE provider (such as BouncyCastle) that still supports Java 7.

*Pay Oracle for an "Extended Support" support contract.

Point out to the client that this is the cost of them not investing the money / effort in keeping their Java application stack up with the latest versions.
If they are still using old libraries and applications that are permanently stuck at Java 7, they should be planning to discard or replace them.  Yes it is painful, but it is more painful in the long term if they don't.  (In July 2022, even "Extended Support" ends for Java 7.  After that, even security fixes will stop.)
Note that Java 8 is due to reach end of life fairly soon too.  Indeed, free support for commercial use has already ceased for Oracle Java 8.  You / they should really be aiming to get to Java 11 ASAP.
I would also suggest that if they want you to continue supporting them on Java 7, they should be (in effect) paying for the Java support contract that you need to do your job.  Renegotiate your billing rate, or whatever.
For more information on Java versions, end of life, and end of support; see:

*

*https://en.wikipedia.org/wiki/Java_version_history

*https://www.oracle.com/java/technologies/java-se-support-roadmap.html


text:
Q: SQL Query Performance I have a table with [1 million data ,11 columns]. My select query [select * from tbl] seems to be taking 2 minutes to complete.
Server is SQL Server Express 2005. Table has a clustered index [primary key], no other indexes.
If I create a copy of the table using select * into table1 from tbl, then the same select query on the new table takes maximum 10 seconds. I couldn't find any differences in table structure
What might causing the original table slow?

A:
What might causing the original table
  slow?

Nothing. It is not slow.
"select * into table from table" - the data never leaves the server.
"select * from table" - the data is sent to the client who has to do processing. it also means you send the data over SOME sort of network interface (even it local) - all that is overhead.
reading 11 million rows simply takes time to process.

A: How are you running the query?  Is is from an SQL tool connected remotely?  If so part of the problem could be related to the cost of shipping the million rows of data to your client (and the client subsequently dealing with that data).  It is also possible that the select * into table1 from tbl query is being cleverly optimised by the database.  Given that the query is creating an exact copy of the table, the database might be able to do a more efficient operation to replicate the data then through its general SQL mechanism.  You can test this by comparing a more complicated query, e.g. use a subset of the rows and add some constraints in the where clause.


text:
Q: How to draw border for panel which is continously resizing c# Using panel as a selection indicator . The panel changes its size according to cursor position on MouseMove event . However when I draw the border as below , previous borders leave their mark on the panel and it displays too many border within same panel . Even tried refresh() before every draw but that makes it glitchy and slow
private void panel1_Paint(object sender, PaintEventArgs e)
{
    this.panel1.Refresh();
    ControlPaint.DrawBorder(e.Graphics, this.panel1.ClientRectangle, Color.DarkBlue, ButtonBorderStyle.Solid);
}

private void drawboard_MouseMove(object sender, MouseEventArgs e)
{
    panel1.Width = e.Location.X - panel1.Left;
    panel1.Height = e.Location.Y - panel1.Top;
}

A: First off, you should never call control paint affecting methods like Invalidate or Refresh inside the control paint handler.
You can solve the original issue by calling Invalidate or Refresh after modifying the size of the panel. Note that it's better to set the Size property with one call rather than Width and Height separately:
private void panel1_Paint(object sender, PaintEventArgs e)
{
    ControlPaint.DrawBorder(e.Graphics, this.panel1.ClientRectangle, Color.DarkBlue, ButtonBorderStyle.Solid);
}

private void drawboard_MouseMove(object sender, MouseEventArgs e)
{
    var size = new Size(Math.Max(e.Location.X - panel1.Left, 0),
        Math.Max(e.Location.Y - panel1.Top, 0));
    if (panel1.Size != size)
    {
        panel1.Size = size;
        panel1.Invalidate();
    }
}

A better option is to set ResizeRedraw property of the selection panel to true. Since it's a protected property, you need to create and use your own Panel subclass. As a bonus, you can also set DoubleBuffered property to true to avoid the flickering, and also move the painting code inside:
class SelectionBox : Panel
{
    public SelectionBox()
    {
        ResizeRedraw = true;
        DoubleBuffered = true;
    }
    protected override void OnPaint(PaintEventArgs e)
    {
        base.OnPaint(e);
        ControlPaint.DrawBorder(e.Graphics, ClientRectangle, Color.DarkBlue, ButtonBorderStyle.Solid);
    }
}

Make your panel1 to be SelectionBox, remove the Paint event handler, and then the mouse move handler could be simple
private void drawboard_MouseMove(object sender, MouseEventArgs e)
{
    panel1.Size = new Size(Math.Max(e.Location.X - panel1.Left, 0),
        Math.Max(e.Location.Y - panel1.Top, 0));
}


text:
Q: Subsetting NumericVector in Rcpp with multiple index ranges I wish to subset a NumericVector in Rcpp using multiple index ranges. In R I would do this the following way:
b <- as.vector(seq(1:100))
c <- b[c(1:3,5:7,9:14)]

In Rcpp I have got the following to return values from a single set of range values:
cppFunction('NumericVector sub_vec(NumericVector my_vec, int low, int high) {
  return my_vec[my_vec > low & my_vec < high];
}')
sub_vec(b,1,3)

How can I modify this function to include multiple ranges like those shown in the above R example?
Any help much appreciated.


text:
Q: Updating File Created Date by x number of days Mac OSX I have a folder of videos (Mac OSX Yosemite) for which I need to change the Created Date by adding 2180 days to the existing Created Date.
Using SetFile from Terminal I am able to manipulate the Created Date, for example I can set it as equivalent to the Modified Date of the same file:
SetFile -d "$(GetFileInfo -m /Users/myfilename.mov)" /Users/myfilename.mov

However, if I try to add the 'Add 2180 days' part it stops working:
SetFile -d "$(GetFileInfo -d /Users/myfilename.mov) +2180 days" /Users/myfilename.mov

I suspect it is an issue with bracket and speech marks but the following did not work either:
SetFile -d "$(GetFileInfo -d /Users/myfilename.mov +2180 days)" /Users/myfilename.mov

How exactly should I be incorporating the '+2180 days' into it?
Edi: Mark Setchell has a solution which works but I am keen to know if there is in fact a way to incorporate '+2180 days' into the GetFileInfo-based -d date variable.

A: That's a lot of fun for something apparently so simple!!!! I think this works, but test it out on some sample files. I left my debugging statements in, but you can safely remove all the echo statements.
#!/bin/bash
# Get name of file as supplied as parameter
file=$1

# Get its timestamp in format "02/08/2015 21:14:44"
timestamp=$(GetFileInfo -d "$1")
echo timestamp:$timestamp

# Convert that to seconds since the Unix Epoch, e.g. 1423430084
epoch=$(date -j -f "%m/%d/%Y %H:%M:%S" "$timestamp" +%s)
echo epoch:$epoch

# Calculate seconds in 2180 days
((offset=2180*3600*24))
echo offset:$offset

# Add offset to epoch
((epoch+=offset))
echo new epoch:$epoch

# Get new date in format that SetFile wants
newdate=$(date -r $epoch "+%m/%d/%Y %H:%M:%S")
echo new date:$newdate

# And finally set the date of the input file
SetFile -d "$newdate" "$file"

Save it as ReDate and make it executable (only necessary once) with
chmod +x ReDate

and run it like this:
./ReDate /Users/myfilename.mov

Sample run:
./ReDate "/Users/Mark/tmp/file with sapce in name.mov"
timestamp:02/09/2015 09:54:01
epoch:1423475641
offset:188352000
new epoch:1611827641
new date:01/28/2021 09:54:01

A: I know this is an older thread, but I wanted to do something like this. The OP @MrDave is asking about adding via normal speech. This can be accomplished with AppleScript.
A bit verbose, but it works:
on run {input}
  set filename to input as text
  set fileDate to (creation date of (get info for input))
  set newDate to fileDate + (1 * days)

  set newMonth to month of newDate as number
  set newMonth to lessThanTen(newMonth)

  set newDay to day of newDate as number
  set newDay to lessThanTen(newDay)

  set newYear to year of newDate as number

  set newHour to hours of newDate as number
  set newHour to lessThanTen(newHour)

  set newMinute to minutes of newDate as number
  set newMinute to lessThanTen(newMinute)

  set divider to "/"
  set newSetDate to newMonth & divider & newDay & divider & newYear & " " & newHour & ":" & newMinute as text
  set printNewDate to "\"" & newSetDate & "\"" as string
  log printNewDate
  -- date format for SetFile: mm/dd/yyyy hh:mm
  do shell script ("SetFile -d " & printNewDate & " -m " & printNewDate & " " & input)
end run

on lessThanTen(num)
  set thisNum to num as number
  if thisNum is less than 10 then
    set newNum to "0" & thisNum
  else
    set newNum to thisNum
  end if
  return newNum as string
end lessThanTen

now from terminal run:
osascript /Users/path/to/scriptName.scpt filename

and here you can actually just drag the file from Finder onto the Terminal  instead of typing the filename itself, then hit enter


text:
Q: How can Excel 2007 / 2010 consume a REST web service? What options exist to consume a REST web service from within Excel 2007 / 2010?  I can use XML Maps to consume a basic XML list, but that doesn't let me build a dynamic URL (so I could include parameters).
For example, I can add an XML Map to Excel for http://machine/service/level/5 and display the values in the workbook just fine - no problem there.  The real question is, how can I dynamically change the /5 part of the URL to come from another cell in excel?
That way I can have a couple of cells that have the options (what ID, what name, etc.) and whenever those values change (ideally) a new dynamic URL would be constructed and the XML map would be refreshed.
Is such a thing possible?  Does anyone else have a better way to take some parameters, call a web service (REST or SOAP, I'm not picky) and shove the results back into excel for further manipulation?

A: XLLoop (http://xlloop.sourceforge.net/) can be used to call make Json of HTTP calls.

A: You can use PowerPivot with Excel 2010.  Download from here.
From the home tab select 'From Data Feeds', then 'From Other Feeds'.
You should be able to use this to point to your URL.
I've read that PowerPivot uses REST but I haven't tried it myself.
Good luck! :)


text:
Q: jQuery circle menu Anyone with idea to make list items rotating in circle.
I'm using this jQuery code to organize elements in circle, now i need to make them rotating, infinite.
    var type = 1,
        radius = '18em',
        start = -90,
        $elements = $('ul li'),
        numberOfElements = (type === 1) ? $elements.length : $elements.length - 1,
        slice = 360 * type / numberOfElements;

    $elements.each(function (i) {
        var $self = $(this),
            rotate = slice * i + start,
            rotateReverse = rotate * -1;

            $self.css({
                'transform': 'rotate(' + rotate  + 'deg) translate(' + radius + ') rotate(' + rotateReverse + 'deg)'
            });
    });

Here is codepen https://codepen.io/pen/jOELYdW.

A:
To using jQuery you can store the current degree of rotation for each item with the data attribute.

$item.data('degree', degree);

Also, you should set an interval to calculate the new degree of the item in each interval.

var $menu = $('#circle'),
    $items = $menu.children('.item'),
    itemCount = $items.length,
    eachSlice = 360 / itemCount;

// ...

// calculate new degree in set interval
currentDegree = $item.data('degree'),
newDegree = currentDegree + eachSlice;

You can see a complete source in the following snippet

$(document).ready(function () {

    var $menu = $('#circle'),
        $items = $menu.children('.item'),
        itemCount = $items.length,
        eachSlice = 360 / itemCount;

    $items.each(function(index, item) {

        var $item = $(item),
            $itemContent = $item.children('.item-content'),
            degree = index * eachSlice;

        $item
            .css({
                'transform' : 'rotate(' + degree + 'deg)'
            })
            .data('degree', degree);

        $itemContent
            .css({
                'transform': 'rotate(' + degree * -1 + 'deg)'
            });

        setTimeout(() => {
            $itemContent.addClass('transition');
            $item.addClass('transition');
        }, 100);

    });

    setInterval(() => {

        $items.each(function (index, item) {

            var $item = $(item),
                $itemContent = $item.children('.item-content'),
                currentDegree = $item.data('degree'),
                newDegree = currentDegree + eachSlice;

            $item
                .css({
                    'transform': 'rotate(' + newDegree + 'deg)'
                })
                .data('degree', newDegree);

            $itemContent
                .css({
                    'transform': 'rotate(' + newDegree * -1 + 'deg)'
                });

        });

    }, 2000);

});
#circle {
  border: 1px solid #ccc;
  border-radius: 50%;
  height: 500px;
  margin: 50px auto;
  position: relative;
  width: 500px;
}

.item {
  border: 1px solid #a55;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  height: 80px;
  justify-content: center;
  left: -40px;
  position: absolute;
  transform-origin: calc(250px + 40px) 40px;
  text-align: center;

  top: calc(50% - 40px);
  width: 80px;
}

.transition {
    transition: 2s linear;
}

        Item 1

        Item 2

        Item 3

        Item 4

        Item 5

        Item 6

A:
You can set coordinates of them on the circle radius with CSS.
  use position, transform-origin, rotate and animation.
Also, you can animate them on the circle radius if you want.
I have written an example for you in the following snippet and this Codepen
You can improve it according to what you needed.

@keyframes animate-on-circle {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(90deg);
  }
  50% {
    transform: rotate(180deg);
  }
  75% {
    transform: rotate(270deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#circle {
  border: 1px solid #ccc;
  border-radius: 50%;
  height: 500px;
  margin: 50px auto;
  position: relative;
  width: 500px;
}

.item {
  border: 1px solid #a55;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  height: 80px;
  justify-content: center;
  left: -40px;
  position: absolute;
  transform-origin: calc(250px + 40px) 40px;
  text-align: center;
  top: calc(50% - 40px);
  width: 80px;
}

#item-1 {
  animation: animate-on-circle infinite 10s linear;
}

#item-2 {
  animation: animate-on-circle infinite 10s 2s linear;
}

#item-3 {
  animation: animate-on-circle infinite 10s 4s linear;
}

#item-4 {
  animation: animate-on-circle infinite 10s 6s linear;
}

#item-5 {
  animation: animate-on-circle infinite 10s 8s linear;
}

Item 1

Item 2

Item 3

Item 4

Item 5


text:
Q: Can I split the word "being" with a "-" (hyphen)? In the following sentence I want to use the word "being". I was told that my use of the word "being" is confusing or unclear. Can I write "being" as "be-ing"? Is that even an acceptable way to write the word?
I am saying the members of nature are being without trying to be.

He depicts the quiet [being or be-ing] of the inhabitants of nature as deliberate living and the busy misdirected life of the working man as without reward or self-actualization.

A:
Being noun
  2 [in singular] The nature or essence of a person.
  'sometimes one aspect of our being has been developed at the expense of the others'
- ODO

The phrase "the quiet [being] of the inhabitants of nature" strongly elicits the definition above. That is, it tends to read as "the quiet essence of ...".
Since the comments suggest that you are distinguishing between existence and living, and wish to express existence in your sentence, the sense you're trying to elicit is slightly different. You're referencing the continuous tense of be (coloured in this case as mere existence):

be verb
  1 Exist.
  'I think, therefore I am'
- ODO

You also ask:

Can I write "being" as "be-ing"? Is that even an acceptable way to write the word?

Consider this from Grammar Girl, a respected writer on grammar:

Sometimes, the placement of a hyphen changes the meaning of your sentence. Let's say you want a "hot-water bottle." With a hyphen between "hot" and "water" you clearly want a water bottle for holding hot water because "hot" and "water" are joined by a hyphen. Without the hyphen between "hot" and "water, you might want a water bottle that is hot. See how the presence or absence of a hyphen could change the meaning?
  ...
  The more likelihood there is for confusion, the more you need a hyphen.

YourDictionary.com says something similar:

The fact is, there's really no set of hyphen rules on which every person can agree.
  ...
  Hyphens can be useful to avoid confusion.

From the above, I'd argue that you should use the hyphenated form be-ing in your context because it elicits the 'be' sense more strongly than the 'being' sense (with respect to the two definitions cited above). It's a legitimate use of the hyphen (avoiding confusion) because the 'being' sense would otherwise dominate.


text:
Q: How to use intent.setData() for changing system settings? I discovered this code online that sends the user directly to the where they need to change the app's system write settings:
Intent writePermission = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
writePermission.setData(Uri.parse("package:" + MainActivity.this.getPackageName()));
MainActivity.this.startActivityForResult(writePermission, 4);

I want to do the same thing but for an accessibility service. I have this code here but it's lacking the second line of the above code that sends the user to the needed service:
Intent changeSettings = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivityForResult(changeSettings, 2);

I want to send the user directly to WindowChangeDetectingService rather than have them look it up in a list.

A:
I discovered this code online that sends the user directly to the where they need to change the app's system write settings

That optional Uri is covered in the documentation for that Intent action.

I want to do the same thing but for an accessibility service.

The documentation for ACTION_ACCESSIBILITY_SETTINGS does not indicate that there is such an option.


text:
Q: Sensor Indicator for Ubuntu 14.04 Is there any repo for stable version of indicator-sensor ubuntu 14.04?
Or are there any other alternatives to indicator-sensor for ubuntu 14.04?

A: There's their ppa:
https://launchpad.net/~alexmurray/+archive/indicator-sensors-daily
Update software source and try installing it.

A: I manually installed the indicator-sensors package for Ubuntu 13.10 on Ubuntu 14.04 and it works fine. So, this can be a temporary solution until the package for Ubuntu 14.04 will be available.

A: It's still not available for 14.04


text:
Q: Did a Mac update ruin my ability to use gcc? I am trying to compile two c files into one executable. In the directory I have only three files; Makefile, main.c and myfunction.c.
Makefile:
CC = gcc
CFLAGS = -Wall -g -O0
LIBS = -lm
SRCS = $(wildcard *.c)
OBJS = $(SRCS:.c=.o)
MAIN = main

all: $(MAIN)
    @echo  Program has been compiled

$(MAIN): $(OBJS)
    $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LIBS)

clean:
    $(RM) *.o *~ $(MAIN)

main.c:
#include <stdio.h>
void myfunc();
int main (int argc, char *argv[]) {
    myfunc();
    return 0;
}

myfunction.c:
#include <stdio.h>
void myfunc() { printf("hello world"); }

output after make:
gcc -Wall -g -O0   -c -o main.o main.c
gcc -Wall -g -O0   -c -o myfunction.o myfunction.c
gcc -Wall -g -O0  -o main main.o myfunction.o -lm
Undefined symbols for architecture x86_64:
  "_myfunc", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [main] Error 1

I had something nearly identical working in the past. I have since clean installed MacOS and updated to Big Sur. Is this the issue or have I overlooked something?

A: I fixed the issue. I'm not sure what part fixed it, but installed Homebrew and used it to install gcc-10. I also deleted the project and started over.

A: myfunc would define like file header
myfunc.h
void myfunc()

Declare in another file
myfunc.c
void myfunc() { printf("hello world"); }

Follow the following tutorial
https://developer.gnome.org/anjuta-build-tutorial/stable/build-make.html.en


text:
Q: Json reader with different type in an array I would like to write a Json reader for such Json
    {
        "headers": [
            {
                "id": "time:monthly",
                "type": "a"
            },
            {
                "id": "Value1",
                "type": "b"
            },
            {
                "id": "Value2",
                "type": "b"
            }
        ],
        "rows": [
            [
                "2013-01",
                4,
                5
            ],
            [
                "2013-02",
                3,
                6
            ]
        ]
    }

I know (thanks to the header) that in the elements of rows the first element is of a type a, the second and the third will be of type b. My goal is to create an object row (List[a],List[b]) (
the number of element of type a and b varies that's why I use List).
My question is how can I parse rows or how can I read a Json array with different type of object and without an id ?

A: I'd be tempted to setup the model with cases classes and mix the play framework macro base json reader with a custom one for your rows like this.
    import play.api.libs.json._

    case class Header(id: String, `type`: String)
    case class Row(a: String, b: Int, c: Int)
    case class Data(headers: Seq[Header], rows: Seq[Row])

    object RowReads extends Reads[Row] {
      def reads(js: JsValue) = js match {
        case JsArray(Seq(a,b,c)) =>
          (a,b,c) match {
            case (a: JsString, b: JsNumber, c: JsNumber) =>
              JsSuccess(Row(a.value,b.value.toInt,c.value.toInt))
            case _ => JsError("nope")
          }
          case _ => JsError("nope")
      }
    }

    object Formats {
      implicit val headerReads = Json.reads[Header]
      implicit val rowReads = RowReads
      implicit val dataReads = Json.reads[Data]

      def readIt(js: JsValue) = {
        Json.fromJson[Data](js: JsValue)
      }
    }

For more details.
https://playframework.com/documentation/2.4.x/ScalaJson


text:
Q: Oracle Apex dynamic action PL/SQL that will change the values in a select list based on a value passed by another field So i have a Table Called "Fruit" this table is manually upload with what kind of Fruit the users like. But we know that we have different colored "Fruit" these colors are not on the table.
So i have created a form for the user and want to create a dynamic select list based on the "Fruit"
Form:
Name: Bob
Age:  45
Fruit: Apple
What color:(Select List based of Fruit) Red,Green,white
Now i have 12 fruit option on the table and maybe six color i want to use, but i do not want all the colors displayed.
So if the "Fruit" column (based on table) was apple only show Red,Green,white in the select list
if the "Fruit" column (based on table) was banana only show Yellow,Green,Brown in the select list
if the "Fruit" column (based on table) was grape only show Red,Green in the select list.

A: APEX can do this quite easily.  Define the query for the colors so that it only shows the colors appropriate for the fruit item selected.  Something like:
select c.color_name, c.color_code
  from colors c
       join fruit_colors fc on fc.color_code = c.color_code
 where fc.fruit_code = :P123_FRUIT_CODE;

(Here P123_FRUIT_CODE is the name of your fruit select list item).
Then set the Cascading LOV Parent Item(s) property of the colors LOV to P123_FRUIT_CODE.
Now, whenever the user changes P123_FRUIT_CODE by selecting a fruit, the colors LOV will be updated to show only the colors available for that fruit.


text:
Q: How do I get data from an api and then send a push notification to my device if something changed (with firebase)? I'm creating an android app in Java which is supposed to check third party APIs for any changes in the cryptocurrency balance and if there are any, then it should send a push notification to my app.
Originally I was thinking about doing this with an AlarmManager but the drawback is that it drains the battery to much. I've heard about Firebase and I would like to use it in my project, but I didn't find any source or documentation on how I could continually get the API data.
I would be really grateful if someone could point me in the right direction or give me an example (I don't know how to actually get the data with firebase, but I saw a lot of documentation on push notifications and I know how to compare the data).

A: You should give it a try to "Firebase cloud functions". Firebase has a lot os features (notification, storage, database, ...), but sometimes you need to integrate them, or make them work by themselves.
Cloud functions uses javascript (no need to be an expert, with the basic you'll be able to start and learn as you go). So you'll be able to: create a javascript code that uses your API to "listen" to events, like currency changes. Inside this change callback, you'll be able to call a Firebase Notification API function to send the notification with the data you want. Not exactly a hard work, but It will take sometime to get the javascript basic and Firebase API's.
You can start with the cloud function documentation:
https://firebase.google.com/docs/functions?hl=pt-br


text:
Q: Authentication troubles for google cloud speech api I trying to get started with google cloud speech with node.js but I am having troubles with authentication. I am following the setup steps outlined on the github. I tried the setup in this tutorial but had no luck.I keep getting this error..
ERROR: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.

I am looking for some insight on how to setup the credentials so I can start running the models.
Any input would be much appreciated. Thank you.

A: As the error message said, you should read this to get your credentials set up.


text:
Q: Check if characters are part of a String I want to check if a set of characters are part of String variable are not,
Ideally I would do one of the below,

*

*Store the characters in a list and loop through each character to check if they exist in the string.

*Form a simple if statement with OR operations in case the character set is small.

Is there a better way to do this, may be using LINQ.
As an example I want to check if any of the characters '>' or '<' or '=', are part of the string 'a > b and b != 10'.

A: You can use Intersect + Any:
bool contains = stringVariable.Intersect("><=").Any();

A: Should not be too difficult:
var content = "a<b";

var isContained = content.Any(c => c == '<')

..or for a list of characters:
var charList = new []{'<', '>'};
var isAnyContained = content.Any(c => charList.Contains(c));

A: You can use the String.IndexOfAny method:
string myString = "a > b and b != 10";
if (myString.IndexOfAny(new char[] { '<', '>', '=' }) >= 0)
    {
    // ...
    }

Or
Dim myString As String = "a > b and b != 10"
If myString.IndexOfAny({">"c, ">"c, "="c}) >= 0 Then
    ' ...
End If


text:
Q: 1, 333, 55555, .... find an expresion for the general term $$1, 333, 55555, ....$$
My work:
If $n\in [u^2+1, (u+1)^2]$,
then $a_n = 2u+1$ for $u=0,1,2,\ldots$
This seems to work but is it possible to have a nice expression for the general term without conditions?

A: If I am interpreting the query correctly, you want $\left(2 \times \lceil\sqrt{n}\rceil\right) - 1,$ where $\lceil x\rceil$ is the ceiling function (smallest integer $\geq x$).

A: Here are some ideas:

*

*If you're allowed to use the sum:

$$(2n + 1 - 10\lfloor\frac{2n + 1}{10}\rfloor)\sum_{i=0}^{2n + 1}10^i$$

*The sum can be rewritten as:

$$(2n + 1 - 10\lfloor\frac{2n + 1}{10}\rfloor)(10^{2(n + 1)} - 1)$$

*The first term can also be rewritten:

$$(10\left\{\frac{2n + 1}{10}\right\})(10^{2(n + 1)} - 1)$$
In each form the first term extracts consecutive odd numbers in a circular way: $1, 3, 5, 7, 9, 1, 3, \dots$ whereas the second term is of the form $11\dots1$.
You can mix them as you want.


text:
Q: Django FormWizard Multiple submissions against same form I am using Djang FormWizard and have scenario where i have to do 1-to-Many save. I have one company and possibly many office holders. Since this is a web based form people can fill this differently. Your company can have 1 office holder and my company can have 10 office holders.
The number of forms is 3(for discussion sake).
1)First form is company detail
2)secondly form is office holders.
3)third form is a summary of what u have filled so far and a button asking if you want to add more office holders.
Using FormWizard i cant seem to figure out how to implement this.
In in a regular scenarios i would have setup a link to the from 2, something like myurl.com?action=addmore and then rendered the form 2 accordingly
I can use wizard_goto_step in template to load form 2 but then i cant seem to figure out how to pass a conditional argument. Conditional argument will allow me to figure out that an additional office holders needs to be added and i then i can load a blank form 2. The conditional field cannot be a checkbox, has to be a button or a link. I do see how i can use button or link in this scenario?
Last resort i am thinking is load from by NamedURL and then check if i can pass the conditional argument can be passed in url(was hoping to avoid this, not really tried this also)
Any ideas?

A: the solution is in implementing  NamedUrlWizardView
https://django-formtools.readthedocs.io/en/latest/wizard.html#usage-of-namedurlwizardview
with NamedUrlWizardView you can send in name value pair in url
solved my problem.


text:
Q: Qt - Making a Splitter Horizontal and Vertical at same time I have a QGridLayout with a QSplitter on it. In that QSplitter I have two elements with a splitter that lets me move the splitter from left to right. Fine, there it's fine. But then I want to add another splitter but that moves up to down. (I'll explain with an image.)

So it's mostly having 2 splitters, one that moves left-to-right and other that moves up-to-down.
I hope you understand.
QGridLayout *layout = new QGridLayout(this);
QSplitter *splitter = new QSplitter();
text1 = new QPlainTextEdit();
text2 = new QPlainTextEdit();
splitter->addWidget(text1);
splitter->addWidget(text2);
text1->resize(800, this->height());
layout->addWidget(splitter, 1, 0);
browser = new QTextBrowser();
browser->resize(1, 1);
layout->addWidget(browser, 2, 0);
setLayout(layout);

Here i add only 1 splitter, since i don't know how to do the 2nd one.

A: You should be able to adapt this for your needs easily. The idea is to create a container for the first two elements, then connect the container with the 3rd element all via splitters.
#include <QtGui>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QWidget wnd;

    QTextEdit *editor1 = new QTextEdit;
    QTextEdit *editor2 = new QTextEdit;
    QTextEdit *editor3 = new QTextEdit;

    QSplitter *split1 = new QSplitter;
    QSplitter *split2 = new QSplitter;

    QVBoxLayout *layout = new QVBoxLayout;

    QWidget *container = new QWidget;
    QVBoxLayout *container_layout = new QVBoxLayout;

    split1->addWidget(editor1);
    split1->addWidget(editor2);

    container_layout->addWidget(split1);
    container->setLayout(container_layout);

    split2->setOrientation(Qt::Vertical);
    split2->addWidget(container);
    split2->addWidget(editor3);

    layout->addWidget(split2);

    wnd.setLayout(layout);

    wnd.show();

    return app.exec();

}


text:
Q: Export XML to local file using JavaScript I have a Windows 7 Gadget that runs JavaScript locally. It sends arguments to a Perl script on the server that returns XML. The XML is just timestamps and raw data. I graph these results into a time series using Flot. The graphs are usually performance data (%CPU utilization, logical disk space, etc.) and I want to have the option to export the results locally as an XML file so the users can open them in excel and generate reports.
Here is a code sample:
var graphData = new Array();//Global variable
function sendQuery(){
  var host_name = $('#hostNameInput').val();

  $.ajax({
    type: "GET",
    url: "http://okcmondev102/cgi-bin/itor_PerfQuery.pl?",//+arguments
    dataType: "XML",
    success: function(xml){
      var results = new Array();
      var counter = 0;

      var $xml = $.xmlDOM(xml);

      $xml.find('DATA').each(function(){
        results[counter] = new Array(2);
        results[counter][0] = $(this).find('TIMESTAMP').text();
        results[counter][1] = $(this).find('VALUE').text();
        counter++;
      });

      plotGraph(results, host_name);
     }//end Success

  });//end AJAX

}//end sendQuery

function plotGraph(results, host_name){

  graphData.push({label: host_name, data: results});

  plot = $.plot($("#resultsArea"),graphData, options);

}//end plotGraph

Any suggestions on how I could accomplish this?

A: Download a file using Javascript
var url='http://server/folder/file.ext';
window.open(url,'Download');


text:
Q: how to apply values of two arrays? Generally: how do I take two arrays and apply a single function that iterates over both of them simultaneously and updates their values?
Specifically:
I have a list of buttons and a list of positions, created via something like this:
let buttons:Array<Button> = makeButtons();
let positions:Array<number> = R.scan(
  (total, width) => total + width,
  0,
  R.map(button => button.width, buttons));

How do I now take the list of positions, and apply them to the buttons?
Related to this is something I'm additionally confused about - is there a technique to control whether the modification is happening on the button itself vs. returning a new button with the same "shape" as the input?
I'd imagine there are scenarios where I'd want to do either of those (e.g. if modifying existing buttons on the screen without needing to redraw them, vs. staying more pure)

A: What you're looking for is zipWith:
zipWith((but, pos) => assoc('position', pos, but), buttons, positions)

Notice that scan as used here will give one more element than is included in the original list: the first element is the initial value of the accumulator.  But zipWith stops when the smallest list is exhausted.  Depending upon whether you want to include that first value or the last one, you might have to add a call to tail.  (I imagine here that position would be the left-hand side of the buttons, and it wouldn't be necessary.)
Note also that you're rewriting some functions that come with Ramda in this:
let positions = R.scan(
  (total, width) => total + width,
  0,
  R.map(button => button.width, buttons));

You could get the same results with
let positions = R.scan(R.add, 0, R.pluck('width', buttons))

Now, you could also did this with a single fold, if you choose, by using a slightly more complex accumulator:
R.compose(R.prop('buttons'), R.reduce((all, curr) => {
  const buttons = append(assoc('position', all.pos, curr), all.buttons);
  const pos = all.pos + curr.width;
  return {pos, buttons}
}, {pos: 0, buttons: []}))(buttons)

This would build your structure in a single pass through the data.  I wouldn't actually recommend this here.  It's a technique I use when I really want to avoid intermediate structures or multiple iterations through a list, but it's an interesting alternative.
You can see all this in the Ramda REPL.

Regarding this:

Related to this is something I'm additionally confused about - is there a technique to control whether the modification is happening on the button itself vs. returning a new button with the same "shape" as the input?

Ramda's philosophy is to never modify your input.  So if you use something like R.assoc, you will always get back something new.  And Ramda will not try to duplicate its inheritance hierarchy.  If you want to modify the buttons in place, my first suggestion is to reconsider, as Ramda's reasons are sound, but if you still want to, then just change the first suggestion above to
zipWith((but, pos) => {but.position = pos; return but}, buttons, positions);


text:
Q: Double quotes(escape character) inside String(format: ) in swift \ is not working inside String(format:) for escaping character.
How to put Double quotes(escape character) inside String(format: ) in swift?
Example
let timeString = String(format: "https://stackoverflow.com/character=\"inside\"")

I need to pass url parameter without double quotes inside String(format:) so I need to escape the double quotes inside
I get stackoverflow.com/character="inside" I need stackoverflow.com/character=inside
I input with quotes as
String(format: 'https://stackoverflow.com/character="inside"')
but while passing to url i should pass it without quotes as
String(format: 'https://stackoverflow.com/character=inside
because in url it shows as
https://stackoverflow.com/character="inside"

A: Just do:
let timeString = String(format: "https://stackoverflow.com/character=\"inside\"").replacingOccurrences(of: "\"", with: "")

This will output as:
https://stackoverflow.com/character=inside

Replace the occurrences of " with nothing.
Happy coding!

A: Simply use string interpolation. You can flexibly pass integer, string, double etc
let timeString = String(format: "https://stackoverflow.com/character=\(inside)")

Refer to: String Interpolation in swift

A: You can do:
let timeString = String(format: "https://stackoverflow.com/character=inside")

Or am I missing something?


text:
Q: How to solve Execution failed for task ':app:compileFlutterBuildRelease'. in flutter I am trying to build api for my flutter apps, but getting this error log
../flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_provider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr);
                        ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1067:7: Error: The getter 'addressOf' isn't defined for the class 'LOGFONT'.
 - 'LOGFONT' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(28).cast<Utf16>();
      ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1112:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  LOGFONT get elfLogFont => addressOf.cast<LOGFONT>().ref;
                            ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1114:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfFullName => addressOf
                            ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1120:26: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfStyle => addressOf
                         ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1126:27: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfScript => addressOf
                          ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2688:7: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
 - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(20).cast<Utf16>().unpackString(128);
      ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2699:11: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
 - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        ..addressOf.cast<Uint8>().elementAt(20).value = 0;
          ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2744:24: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_DEVICE_INFO'.
 - 'BLUETOOTH_DEVICE_INFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get szName => addressOf
                       ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2837:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value;
      ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2840:5: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value =
    ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2845:28: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String.fromCharCodes(addressOf.cast<Uint8>().asTypedList(pinLength));
                           ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2853:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(idx).value = pinData[idx];
      ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:38:31: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final iid = GUID.allocate().addressOf;
                              ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:56:33: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final clsid = GUID.allocate().addressOf;
                                ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/winrt/winrt_helpers.dart:86:40: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final riidCalendar = GUID.allocate().addressOf;
                                       ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:197:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:200:49: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_DesktopWallpaper).addressOf,
                                                ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:203:48: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IDesktopWallpaper).addressOf,
                                               ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:58:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:61:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_FileOpenDialog).addressOf,
                                              ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:64:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IFileOpenDialog).addressOf,
                                             ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:99:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:102:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_FileSaveDialog).addressOf,
                                              ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:105:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IFileSaveDialog).addressOf,
                                             ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:164:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:167:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_KnownFolderManager).addressOf,
                                                  ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:170:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IKnownFolderManager).addressOf,
                                                 ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:128:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:131:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_NetworkListManager).addressOf,
                                                  ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:134:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_INetworkListManager).addressOf,
                                                 ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:82:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:84:68: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final hr = CoCreateInstance(GUID.fromString(CLSID_WbemLocator).addressOf,
                                                                   ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:85:64: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        nullptr, CLSCTX_ALL, GUID.fromString(IID_IWbemLocator).addressOf, ptr);
                                                               ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.
 - 'Utf8' is from 'package:ffi/src/utf8.dart' ('../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String toString() => fromUtf8(addressOf);
                                ^^^^^^^^^
../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs and unions are undefined behavior.
class Utf16 extends Struct {
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs and unions are undefined behavior.
class Utf8 extends Struct {
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs and unions are undefined behavior.
class NLM_SIMULATED_PROFILE_INFO extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs and unions are undefined behavior.
class STATSTG extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7: Error: Struct 'CLSID' is empty. Empty structs and unions are undefined behavior.
class CLSID extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7: Error: Struct 'SAFEARRAY' is empty. Empty structs and unions are undefined behavior.
class SAFEARRAY extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7: Error: Struct 'PROPVARIANT' is empty. Empty structs and unions are undefined behavior.
class PROPVARIANT extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7: Error: Struct 'PROPERTYKEY' is empty. Empty structs and unions are undefined behavior.
class PROPERTYKEY extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7: Error: Struct 'EXCEPINFO' is empty. Empty structs and unions are undefined behavior.
class EXCEPINFO extends Struct {}
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7: Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs and unions are undefined behavior.
class BLUETOOTH_PIN_INFO extends Struct {
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7: Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs and unions are undefined behavior.
class ENUMLOGFONTEX extends Struct {
      ^
../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
  final int totalSize = count * sizeOf<T>();
                                ^

FAILURE: Build failed with an exception.

* Where:
Script '/Library/AppsProject/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Library/AppsProject/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 17s
Running Gradle task 'assembleRelease'...                           18.1s
Gradle task assembleRelease failed with exit code 1

I have tried to do flutter clean and flutter pub get and also delete my pub spec.lock but still getting that error log. Is there a way to solve this?


text:
Q: why can't we create our own ostream object If cout is an object of ostream class, then why can't we declare our own object, say, 'out' from the same class. i.e, isn't the following code supposed to work??
#include<iostream>
using namespace std;
int main()
{
    ostream out;
    out<<"something";
}

or otherwise
#include<iostream>
using namespace std;
int main()
{
    ostream_withassign out;
    out<<"something";
}

A: Stream objects require a buffer to send data to the external device. The standard output stream object, std::cout, is initialized with a buffer the encapsulates transport to wherever your output appears. Here is a contrived example:
std::ostream cout(/* buffer */);

To make your own stream object that pretends to be the standard stream object, you can simply pass the buffer of std::cout to its constructor. Note that I wouldn't recommend doing this in practice:
std::ostream copy(std::cout.rdbuf()); // Note: not a *real* copy

copy << "Hello World";

A: You didn't set the ostream object(what does this stream output to), of course you can't use it.
http://www.cplusplus.com/reference/iostream/ostream/ostream/
i.e.
// ostream constructor
#include <iostream>
#include <fstream>
using namespace std;

int main () {
  filebuf fb;
  fb.open ("test.txt",ios::out);
  ostream os(&fb);
  os << "Test sentence\n";
  fb.close();
  return 0;
}

A: ostream class is derived from ios class.
Constructor of ios class looks like below.
public: explicit ios (streambuf* sb);
protected: ios();

Which means default constructor of ios is protected and hence you can't create object using default constructor of ostream.
Only way left to create object of ostream is using streambuf sb* argument.
std::ostream my_obj(std::cout.rdbuf());

Similarly, you can't pass ostream objects by value.
Reason
ios is derived from ios_base.
Its copy constructor is private.
protected: ios_base();
private: ios_base (const ios_base&);

A: you can do this only:
#include <iostream>

std::ostream& gvar = std::cout << "Hello world" << std::endl;

int main() {}

from:
http://xazax.web.elte.hu/


text:
Q: why do we consider xml when we named the AJAX? I have been working with AJAX lot of time. In those instance, I have used json, plain html and xml to send the server response to client side. My question is why AJAX stand for asynchronous xml? we can use other format also to send the server response as I mentioned earlier.
This may be silly question but anybody know why does AJAX name come from asynchronous xml?

A: At the core of it, you're using an XMLHttpRequest object, that is part of the native Javascript library.


text:
Q: MDBottomNavigation transition direction Is there a way to change the transition direction on a MDBottomNavigation?
I can't figure out how...
bottom_navigation.transition.direction = 'left'

is not working - i get the error
 AttributeError: 'MDBottomNavigation' object has no attribute 'transition'


text:
Q: Spark redis connector to write data into specific index of the redis I'm trying to read the data from Cassandra and write to Redis of a specific index. let's say Redis DB 5.
I need to write all data into Redis DB index 5 in the hashmap format.
 val spark = SparkSession.builder()
  .appName("redis-df")
  .master("local[*]")
  .config("spark.redis.host", "localhost")
  .config("spark.redis.port", "6379")
  .config("spark.redis.db", 5)
  .config("spark.cassandra.connection.host", "localhost")
  .getOrCreate()

  import spark.implicits._
    val someDF = Seq(
      (8, "bat"),
      (64, "mouse"),
      (-27, "horse")
    ).toDF("number", "word")

    someDF.write
      .format("org.apache.spark.sql.redis")
      .option("keys.pattern", "*")
      //.option("table", "person"). // Is it mandatory ?
      .save()

Can I save data into Redis without a table name? Actually just I want to save all data into Redis index 5 without table name is it possible?
I have gone through the documentation of spark Redis connector I don't see any example related to this.
Doc link : https://github.com/RedisLabs/spark-redis/blob/master/doc/dataframe.md#writing
I'm currently using this version of spark redis-connector
    <dependency>
        <groupId>com.redislabs</groupId>
        <artifactId>spark-redis_2.11</artifactId>
        <version>2.5.0</version>
    </dependency>

Did anyone face this issue? any workaround?
The error I get if I do not mention the table name in the config
FAILED
  java.lang.IllegalArgumentException: Option 'table' is not set.
  at org.apache.spark.sql.redis.RedisSourceRelation$$anonfun$tableName$1.apply(RedisSourceRelation.scala:208)
  at org.apache.spark.sql.redis.RedisSourceRelation$$anonfun$tableName$1.apply(RedisSourceRelation.scala:208)
  at scala.Option.getOrElse(Option.scala:121)
  at org.apache.spark.sql.redis.RedisSourceRelation.tableName(RedisSourceRelation.scala:208)
  at org.apache.spark.sql.redis.RedisSourceRelation.saveSchema(RedisSourceRelation.scala:245)
  at org.apache.spark.sql.redis.RedisSourceRelation.insert(RedisSourceRelation.scala:121)
  at org.apache.spark.sql.redis.DefaultSource.createRelation(DefaultSource.scala:30)
  at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:45)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)

A: The table option is mandatory. The idea is that you specify the table name, so it is possible to read the dataframe back from Redis providing that table name.
In your case another option is to convert the dataframe to the key/value RDD and use sc.toRedisKV(rdd)

A: I have to disagree.  I'm dealing with the exact same issues you are.  Here's what I have found:

*

*You must either reference a table OR keys pattern. (e.g.)
df = spark.read.format("org.apache.spark.sql.redis")
.option("keys.pattern", "rec-*")
.option("infer.schema", True).load()
In my case, I'm using a HASH and the HASH keys all begin with "rec-" followed by a int.
The spark-redis code considers the "rec-" a table. As mentioned, the trick is if you want to read the data back into Spark.  It wants a table name but it seems to use a colon as the delimiter.  Since I want to do read/write, I simply changed my table names to "rec:" and was good-to-go.
I think your confusion stems from the fact that in your example, you only have one record defined in Spark.  What if you have two?  Redis needs to create two different keys like "person:1" or "person:2".  It uses the term table to describe "person". Is it a key or a table? The docs don't seem to be consistent.
My issue at the moment is being able to save to a different Redis db by somehow changing the db context .config("spark.redis.db", 5).  This doesn't seem to work for me when I use it in df.write.format.  Any ideas?


text:
Q: react native: what is the error while i trying to navigate to some page? what is the issue while i trying to navigate to some page ?
i try to navigate to some page but cant do it and i dont understand whats missing there ?
i add image of the error:

this is my example :
<TouchableOpacity
        onPress={() => props.navigation.navigate('PAGE9')}
        style={styles.button}
      >
        <Text style={styles.textButton}>MOVE ON</Text>
        <Image style={{ height: 60, width: 60 }} />
      </TouchableOpacity>

A: In PAGE9, or whichever component you are trying to render, you are making a reference to params.list - something like {route.params.list}
This can be done only if you passed a parameter which you probably didn't/forgot to do, and that's why its undefined.
Simply put, your error is the referencing/calling of an undefined value.


text:
Q: How do you get the party girl? Can you please tell me how to get the party girl and what she sells for how much?

A: Party Girl information.. the following pre-reqs must be met before she moves in like a normal NPC

*

*There is no NPC waiting to move in.

*There is an empty house.

*You have at least 8 other NPCs. (May not be a necessary prerequisite since Party Girl can spawn with less than 8 other NPCs in a world. Could possibly affect spawn chance though.)

A: The party girl has a 2% chance to spawn/move in each day when the following requirements are met:

*

*Have at least 8 NPCs

*No one is waiting to move in

*You have an empty room for her to move in to.

She sells fun party/cosmetic items like the bubble machine, confetti gun, fireworks and bubble wand.
http://terraria.gamepedia.com/Party_Girl


text:
Q: What is the simplest way to create a page tab on the latest version of fb? All I want to do is create a few pages with sign up forms for our fans and customers on our business facebook page.
I created the new app, named it and went on to the basic settings. From what I can tell I just need to set up the "page tab" info. I Named the tab, put in the page tab url, secure page tab url and uploaded a tab image.
Then I wait for it to show up on our fb page. I refresh the page and for a few seconds it looks like something is being loaded in the list of tabs. But then it stops and the layout of default tabs (photos, likes, and events) are unchanged.
The tab should link to the app url which should load inside of an iframe which will have the html from our web server.
That's how I understand it anyways.

A: You must add manually the application on your page through this URL: http://www.facebook.com/dialog/pagetab?app_id=APP_ID&redirect_uri=https://www.facebook.com/
Remember to replace APP_ID first.


text: Q: How to Solve NoClassDefFound error in android studio while connecting with mongodb? I have a cluster in mongodb atlas and I am trying to connect with the database from my android app. But  I am getting "noclassdeffound" error. I have tried both mongo-driver and mongo-java-driver in the dependency. What's going wrong? Is there any solution?


text:
Q: Adding an ajax control toolkit accordion to a page throws a security exception I have this line declared in my web.config file:
<add tagPrefix="ajax"
     namespace="AjaxControlToolkit"
     assembly="AjaxControlToolkit"/>

When I add an ajax:Accordion to my webpage, I get the following error message:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
If I comment out the ajax:Accordion, the error disappears.

A: Try to set the below in your web.config
<system.web>
 <trust level="Full" originUrl="" />
</system.web>


text:
Q: Не работают шейдеры в OpenGL ES 2.0 на Андроид 4.2.2 Проблема с загрузкой шейдеров. Делал по урокам. На Андроид 5.1.1 все работает, на 4.2.2, возникает ошибка с шейдерами. Т.е он не хочет их считывать, проверку сделал вот такого рода. Как можно решить эту проблему?
int fragmentShaderId = ShaderUtils.createShader(context, GL_FRAGMENT_SHADER, R.raw.fragment_shader);
if (fragmentShaderId == 0) Log.e("fragmentShaderId", "0");

Проверка может показаться не правильной, но при запуске на 5.1.1 ошибок в логах нет.
Как запилить шейдеры по другому?
Лог ошибок:
08-15 16:16:23.431 31539-31539/? I/dalvikvm: Could not find method android.support.v7.widget.LinearLayoutCompat.drawableHotspotChanged, referenced from method android.support.design.internal.ForegroundLinearLayout.drawableHotspotChanged
08-15 16:16:23.431 31539-31539/? W/dalvikvm: VFY: unable to resolve virtual method 17092: Landroid/support/v7/widget/LinearLayoutCompat;.drawableHotspotChanged (FF)V
08-15 16:16:23.431 31539-31539/? D/dalvikvm: VFY: replacing opcode 0x6f at 0x0000
08-15 16:16:23.561 31539-31555/? E/fragmentShaderId: 0
08-15 16:16:23.561 31539-31555/? E/programm id:  = 0
08-15 16:28:18.281 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
08-15 16:28:18.281 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
08-15 16:28:18.291 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
08-15 16:28:18.291 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
08-15 16:30:35.721 31539-31543/com.example.vladimir.newopengles D/dalvikvm: GC_CONCURRENT freed 345K, 5% free 8335K/8712K, paused 27ms+4ms, total 159ms
08-15 16:33:00.741 31539-31555/com.example.vladimir.newopengles E/fragmentShaderId: 0
08-15 16:33:00.741 31539-31555/com.example.vladimir.newopengles E/programm id:  = 0
08-15 16:38:01.471 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
08-15 16:38:01.471 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
08-15 16:38:01.541 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
08-15 16:38:01.541 31539-31539/com.example.vladimir.newopengles W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
08-15 16:44:38.451 31539-31555/com.example.vladimir.newopengles E/fragmentShaderId: 0
08-15 16:44:38.451 31539-31555/com.example.vladimir.newopengles E/programm id:  = 0

A: 08-15 16:16:23.561 31539-31555/? E/fragmentShaderId: 0
08-15 16:16:23.561 31539-31555/? E/programm id:  = 0
0 - означает что шейдер fragmentShader  не скомпилился и как сдедствие весь programm . Надо смотреть текст шейдеров и искать там ошибки.
Если это не коммерческая тайна выкладывай текст, поковыряемся.


text:
Q: Gerund or Present Participle?
"Which is exactly what you don't want your programmers learning."

Is "learning" gerund or present participle in the above sentence?

A: It is a participle predicatively adjected to programmers. If it were a
gerund, it would have to be capable of being interpreted as a noun
substantive, which it is not.
It may help to expand the sentence into

Which is exactly what you don't want your programmers to be learning.

What you don't want is a situation where

Your programmers are learning ...

Here, learning is clearly a predicative adjective.  The fact that
what is the object of learning qua verb does not prevent the latter
from also having the function of an adjective.

Note that, as far as the distinction between participle and gerund
is concerned, one needs only consider that participles are adjectives
while gerunds are substantives.  If the progressive aspect associated
with present participles is here absent, this does not mean that
learning is not a present participle, but rather that the progressive
aspect does not always follow present participles.

A: The OP's sentence is unnecessarily complicated in that it involves a fuse relative construction. So I'll use a simplified example, (1a):

(1a) You don't want your programmers [learning it].

This is a raising construction in that your programmers is the object of the verb want, syntactically but not semantically. That is, in (1a) it is not your programmers that you don't want but the accusative case your programmers shows that your programmers somehow is the syntactic object of the verb want. This is because syntactically your programmers raises to the matrix clause as object even though semantically it is subject of the subordinate clause learning it. Hence, the raising construction.
The same raising construction is found in (1b):

(1b) You don't want your programmers [to learn it].

Note that (1a) is virtually equivalent in meaning to (1b) but not to (1c):

(1c) You don't want your programmers [to be learning it].

(1a)'s learning doesn't have a progressive meaning whereas (1c)'s learning does.
This can be proved by the fact that, while (2a) is grammatical, (2c) is ungrammatical because the verb know cannot be used in the progressive aspect.

(2a) You don't want your programmers [knowing it].
(2b) You don't want your programmers [to know it].
(2c) *You don't want your programmers [to be knowing it].

Therefore, knowing in (2a) doesn't have a progressive meaning.
With that said, let's address the question.
The grammatical nature of learning is determined by the usage of the matrix verb want. The verb want doesn't normally allow a V-ing phrase (e.g., learning it) as complement:

(3a) *You don't want [learning it].
(3b) You don't want [to learn it].

Even when your programmers is kept as object, the verb want doesn't allow a V-ing phrase when the verb is not negated:

(4) *You want your programmers [learning it].

What all this means is that the verb want cannot be taking learning it as object, and therefore that learning it is not a gerund in (1a). Since it's not a gerund, it has to be a participle.

A: In a comment, John Lawler wrote:

Both. 'Present participle' is the name of the verb form ending in -ing.  'Gerund' is the name of a particular complement construction that uses the present participle form of the verb. And learning in the example sentence is a gerund, the direct object of want. Since want can also take infinitive complements, what you don't want your programmers to learn would also be grammatical, though it wouldn't use either gerund or participle form.


text:
Q: Check if a directory contains only directories and suppress output What I have so far is this:
if [[ $(find $directory -type f) -eq 0 ]]; then
  echo "Specified directory contains only subdirectories and no file";
  exit 1;
fi

The check works, but if said directory does have files in it, I see the output of the command 'find'. I don't need to see it, I just want to know if the directory in question contains only directories, and if it does, show that message.
I put this check before a for loop over the directory, so that if it doesn't have files terminates.
I feel like there has to be a simple way to achieve this result but couldn't find anything specific to this. Do you have a solution?

A: You don't need ; at the end of the line in shell. Also, find does
not return a number - you have to count number of matches. This should
work:
if [[ "$(find "$directory" -type f -printf . | wc -c)"  -eq 0 ]]; then
  echo "Specified directory contains only subdirectories and no file"
  exit 1
fi


text:
Q: I am trying to build an AR app in Unity but the same errors keep appearing when I try to build and run I am trying to build an AR app in Unity, specifically I am trying to create an app that uses vuforia to track an image and place a 3D object over it.
Everything works just fine up to the point of actually building and running the app. I was able to import vuforia just fine, and the demo in Unity works as well but I always get the same error when I try to build it onto a phone.
The errors are
[10.27.29] Build completed with a result of 'failed' in 1 seconds 1307 ms)
  UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
  [10.27.29] UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer
(UnityEditor.BuildPlayerOptions) [0x002cc] in <bfe26bbc7be749c7bb22d52435e15888>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation,
UnityEdior.BuildOptions defaultBuildOptions) [0x00080] in UnityEngine.GUIUtility:ProcessEvent
(int,intptr,bool&)

I've tried building onto a different phone, using different version of the Unity Editor, just building it first. I've been stuck for a while now and I don't know what I'm doing wrong.
I just started using Unity so the problem might be something small but anything would help!


text:
Q: NavigationDrawer in one of the Fragments of MainActivity I have an app that has one MainActivity with BottomNavigation which switches between three Fragments (Fragment 1, 2, 3) as shown in the picture.

In Fragment 3 I want to have a NavigationDrawer which can switch between 3 items, my question is how do I implement this? I've searched for a while but haven't found exactly my case explanation, though this design can be often found in many popular social apps. What should be the NavHostFragment, where do initialize NavController? And also, those 3 items should also be fragments?

A: I have implemented the navigation Behavior in the following project that mimics your requirement
It should be a good starting point for you.
OUTPUT

GITHUB REPO https://github.com/usman14/NavigationComponent